linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vidya Sagar <vidyas@nvidia.com>
To: Jon Hunter <jonathanh@nvidia.com>, Bjorn Helgaas <helgaas@kernel.org>
Cc: <lorenzo.pieralisi@arm.com>, <bhelgaas@google.com>,
	<robh+dt@kernel.org>, <amurray@thegoodpenguin.co.uk>,
	<gustavo.pimentel@synopsys.com>, <jingoohan1@gmail.com>,
	<Joao.Pinto@synopsys.com>, Thierry Reding <treding@nvidia.com>,
	Krishna Thota <kthota@nvidia.com>, <linux-pci@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Query regarding the use of pcie-designware-plat.c file
Date: Sun, 20 Jun 2021 19:05:45 +0530	[thread overview]
Message-ID: <f9bc8a51-7bf8-349d-365b-0493dd811f01@nvidia.com> (raw)
In-Reply-To: <10a92c35-6e4d-0428-079c-7e98ff6e9414@nvidia.com>

Given Rob's latest reply, I think Jon's patch addressed the issue in the 
correct way. And IIUC, I think this is how it should be for all Synopsys 
DesignWare implementations unless the implementation really claims that 
it can even work with the generic pcie-designware-plat.c file, otherwise 
it shouldn't contain 'snps,dw-pcie' compatibility string.
IMHO, the addition of 'snps,dw-pcie' along with the respective platform 
specific compatibility string should be strictly restricted.
I think this thread is considered to be concluded at this point.

Thanks,
Vidya Sagar

On 6/16/2021 1:24 PM, Jon Hunter wrote:
> External email: Use caution opening links or attachments
> 
> 
> On 15/06/2021 20:42, Bjorn Helgaas wrote:
>> On Wed, Jun 09, 2021 at 05:54:38PM +0100, Jon Hunter wrote:
>>>
>>> On 09/06/2021 17:30, Bjorn Helgaas wrote:
>>>> On Wed, Jun 09, 2021 at 12:52:37AM +0530, Vidya Sagar wrote:
>>>>> Hi,
>>>>> I would like to know what is the use of pcie-designware-plat.c file. This
>>>>> looks like a skeleton file and can't really work with any specific hardware
>>>>> as such.
>>>>> Some context for this mail thread is, if the config CONFIG_PCIE_DW_PLAT is
>>>>> enabled in a system where a Synopsys DesignWare IP based PCIe controller is
>>>>> present and its configuration is enabled (Ex:- Tegra194 system with
>>>>> CONFIG_PCIE_TEGRA194_HOST enabled), then, it can so happen that the probe of
>>>>> pcie-designware-plat.c called first (because all DWC based PCIe controller
>>>>> nodes have "snps,dw-pcie" compatibility string) and can crash the system.
>>>>
>>>> What's the crash?  If a device claims to be compatible with
>>>> "snps,dw-pcie" and pcie-designware-plat.c claims to know how to
>>>> operate "snps,dw-pcie" devices, it seems like something is wrong.
>>>>
>>>> "snps,dw-pcie" is a generic device type, so pcie-designware-plat.c
>>>> might not know how to operate device-specific details of some of those
>>>> devices, but basic functionality should work and it certainly
>>>> shouldn't crash.
>>>
>>> It is not really a crash but a hang when trying to access the hardware
>>> before it has been properly initialised.
>>
>> This doesn't really answer my question.
>>
>> If the hardware claims to be compatible with "snps,dw-pcie" and a
>> driver knows how to operate "snps,dw-pcie" devices, it should work.
>>
>> If the hardware requires initialization that is not part of the
>> "snps,dw-pcie" programming model, it should not claim to be compatible
>> with "snps,dw-pcie".  Or, if pcie-designware-plat.c is missing some
>> init that *is* part of the programming model, maybe it needs to be
>> enhanced?
> 
> Right and this is exactly why I removed the compatible string
> "snps,dw-pcie" for Tegra194 because it is clear that this does not work
> and hence not compatible.
> 
> Sagar is purely trying to understand if this is case of other devices as
> well or just Tegra194.
> 
> Jon
> 
> --
> nvpublic
> 

      reply	other threads:[~2021-06-20 13:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 19:22 Query regarding the use of pcie-designware-plat.c file Vidya Sagar
2021-06-08 21:17 ` Gustavo Pimentel
2021-06-09  5:26   ` Vidya Sagar
2021-06-09  9:49     ` Thierry Reding
2021-06-15  3:28       ` Vidya Sagar
2021-06-09 16:30 ` Bjorn Helgaas
2021-06-09 16:54   ` Jon Hunter
2021-06-15 19:42     ` Bjorn Helgaas
2021-06-15 21:05       ` Rob Herring
2021-06-16  7:54       ` Jon Hunter
2021-06-20 13:35         ` Vidya Sagar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9bc8a51-7bf8-349d-365b-0493dd811f01@nvidia.com \
    --to=vidyas@nvidia.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=bhelgaas@google.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=helgaas@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kthota@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).