mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sinan Kaya <okaya@codeaurora.org>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: cov@codeaurora.org, Tomasz Nowicki <tn@semihalf.com>,
	will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org,
	Lorenzo.Pieralisi@arm.com, arnd@arndb.de, hanjun.guo@linaro.org,
	jchandra@broadcom.com, dhdang@apm.com, ard.biesheuvel@linaro.org,
	robert.richter@caviumnetworks.com, mw@semihalf.com,
	Liviu.Dudau@arm.com, ddaney@caviumnetworks.com,
	wangyijing@huawei.com, msalter@redhat.com,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linaro-acpi@lists.linaro.org, jcm@redhat.com,
	andrea.gallo@linaro.org, jeremy.linton@arm.com,
	liudongdong3@huawei.com, gabriele.paoloni@huawei.com,
	jhugo@codeaurora.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] PCI: QDF2432 32 bit config space accessors
Date: Thu, 3 Nov 2016 12:58:10 -0400	[thread overview]
Message-ID: <aa8bc916-9363-2de7-2997-4ce470562b2c@codeaurora.org> (raw)
In-Reply-To: <20161103140058.GA31142@bhelgaas-glaptop.roam.corp.google.com>


On 11/3/2016 10:00 AM, Bjorn Helgaas wrote:
> On Wed, Nov 02, 2016 at 12:36:16PM -0400, Sinan Kaya wrote:
>> Hi Bjorn,
>>
>> On 11/2/2016 12:08 PM, Bjorn Helgaas wrote:
>>> On Tue, Nov 01, 2016 at 07:06:31AM -0600, cov@codeaurora.org wrote:
>>>> Hi Bjorn,
>>>>
>>>> On 2016-10-31 15:48, Bjorn Helgaas wrote:
>>>>> On Wed, Sep 21, 2016 at 06:38:05PM -0400, Christopher Covington wrote:
>>>>>> The Qualcomm Technologies QDF2432 SoC does not support accesses
>>>>>> smaller
>>>>>> than 32 bits to the PCI configuration space. Register the appropriate
>>>>>> quirk.
>>>>>>
>>>>>> Signed-off-by: Christopher Covington <cov@codeaurora.org>
>>>>>
>>>>> Hi Christopher,
>>>>>
>>>>> Can you rebase this against v4.9-rc1?  It no longer applies to my tree.
>>>>
>>>> I apologize for not being clearer. This patch depends on:
>>>>
>>>> PCI/ACPI: Extend pci_mcfg_lookup() responsibilities
>>>> PCI/ACPI: Check platform-specific ECAM quirks
>>>>
>>>> These patches from Tomasz Nowicki were previously in your pci/ecam-v6
>>>> branch, but that seems to have come and gone. How would you like to
>>>> proceed?
>>>
>>> Oh yes, that's right, I forgot that connection.  I'm afraid I kind of
>>> dropped the ball on that thread, so I went back and read through it
>>> again.
>>>
>>> I *think* the current state is:
>>>
>>>   - I'm OK with the first two patches that add the quirk
>>>     infrastructure.
>>>
>>>   - My issue with the last three patches that add ThunderX quirks is
>>>     that there's no generic description of the ECAM address space.
>>>
>>> So if I understand correctly, your Qualcomm patch depends only on the
>>> first two patches.
>>>
>>> Then the question is how the Qualcomm ECAM address space is described.
>>> Your quirk overrides the default pci_generic_ecam_ops with the
>>> &pci_32b_ops, but it doesn't touch the address space part, so I assume
>>> the bus ranges and corresponding address space in your MCFG is
>>> correct.  So far, so good.
>>
>> Qualcomm ECAM space includes both the root port and the endpoint address
>> space with a single contiguous 256 MB address space described in MCFG table.
>> There is no need to describe additional resources like PNP0C02.
> 
> This is the crucial point I have failed to communicate clearly: the
> PNP0C02 resource is *always* required, even if the MCFG is correct.
> 

Interesting...

It looks like there is a lot of lessons learnt here from history.

I think this requirement is only true if your system DDR space and PCIe
space overlaps in the memory map. I understand that Intel systems allow
sharing of these two memory ranges. An OS could potentially reclaim this
address range.

If there is no overlap and PCI is not enabled, there can't be any SW entity
to reclaim this space. 

Did I miss something?

> The reason is that MCFG is a PCI-specific table, and it should be
> possible to boot a kernel with no PCI support.  That kernel will not
> look at the MCFG.  The PCI hardware will still be present and will
> still consume the ECAM space, so the OS must be able to discover that
> the ECAM space is not available for other devices.
> 
> The usual way to for the OS to discover that would be via the _CRS of
> a PNP0A03 or PNP0A08 host bridge device.  _CRS is what I mean by a
> "generic" way to describe this address space, because the ACPI core
> can interpret _CRS for all ACPI devices, even if the kernel doesn't
> contain drivers for all of those devices.
> 
> It turns out that we can't use the _CRS of host bridges because of the
> Producer/Consumer bit screwup [1].  So the fallback is to include the
> ECAM space in the _CRS of a PNP0C02 device.  This is what the PCI
> Firmware spec r3.0, Table 4-2, footnote 2 is talking about.
> 
> Bjorn
> 
> [1] The original ACPI spec intent was that Consumer resources would be
> space like ECAM that is consumed directly by the bridge, and Producer
> resources would be the windows forwarded down to PCI.  But BIOSes
> didn't use the Producer/Consumer bit consistently, so we have to
> assume that all resources in host bridge _CRS are windows, which
> leaves us no way to describe the Consumer resources.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.

  reply	other threads:[~2016-11-03 16:58 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 19:24 [PATCH V6 0/5] ECAM quirks handling for ARM64 platforms Tomasz Nowicki
2016-09-09 19:24 ` [PATCH V6 1/5] PCI/ACPI: Extend pci_mcfg_lookup() responsibilities Tomasz Nowicki
2016-09-09 19:24 ` [PATCH V6 2/5] PCI/ACPI: Check platform specific ECAM quirks Tomasz Nowicki
2016-09-12 22:24   ` Duc Dang
2016-09-12 22:47     ` Duc Dang
2016-09-13  5:58       ` Tomasz Nowicki
2016-09-13  6:37     ` Tomasz Nowicki
2016-09-13  2:36   ` Dongdong Liu
2016-09-13  6:32     ` Tomasz Nowicki
2016-09-13 11:38       ` Dongdong Liu
2016-09-14 12:40         ` Lorenzo Pieralisi
2016-09-15 10:58         ` Lorenzo Pieralisi
2016-09-16  9:02           ` Gabriele Paoloni
2016-09-16 12:27             ` Christopher Covington
2016-09-16 13:42               ` Gabriele Paoloni
2016-09-09 19:24 ` [PATCH V6 3/5] PCI: thunder-pem: Allow to probe PEM-specific register range for ACPI case Tomasz Nowicki
2016-09-19 18:09   ` Bjorn Helgaas
2016-09-20  7:23     ` Tomasz Nowicki
2016-09-20 13:33       ` Bjorn Helgaas
2016-09-20 13:40         ` Ard Biesheuvel
2016-09-20 14:05           ` Bjorn Helgaas
2016-09-20 15:09             ` Ard Biesheuvel
2016-09-20 19:17               ` Bjorn Helgaas
2016-09-21 14:05                 ` Lorenzo Pieralisi
2016-09-21 18:04                   ` Bjorn Helgaas
2016-09-21 18:58                     ` Duc Dang
2016-09-21 19:18                       ` Bjorn Helgaas
2016-09-23 10:53                         ` Tomasz Nowicki
2016-09-22  9:49                     ` Lorenzo Pieralisi
2016-09-22 11:10                       ` Gabriele Paoloni
2016-09-22 12:44                         ` Lorenzo Pieralisi
2016-09-22 18:31                           ` Bjorn Helgaas
2016-09-22 22:10                             ` Bjorn Helgaas
2016-09-23 10:11                               ` Lorenzo Pieralisi
2016-09-23 10:58                                 ` Gabriele Paoloni
2017-09-14 14:06                                   ` Ard Biesheuvel
2017-09-26  8:23                                     ` Gabriele Paoloni
2016-09-22 14:20                       ` Christopher Covington
2016-09-21 14:10                 ` Gabriele Paoloni
2016-09-21 18:59                   ` Bjorn Helgaas
2016-09-22 11:12                     ` Gabriele Paoloni
2016-09-09 19:24 ` [PATCH V6 4/5] PCI: thunder: Enable ACPI PCI controller for ThunderX pass2.x silicon version Tomasz Nowicki
2016-09-19 15:45   ` Bjorn Helgaas
2016-09-20  7:06     ` Tomasz Nowicki
2016-09-20 13:08       ` Bjorn Helgaas
2016-09-21  8:05         ` Tomasz Nowicki
2016-09-09 19:24 ` [PATCH V6 5/5] PCI: thunder: Enable ACPI PCI controller for ThunderX pass1.x " Tomasz Nowicki
2016-09-09 19:30 ` [PATCH V6 0/5] ECAM quirks handling for ARM64 platforms Tomasz Nowicki
2016-09-20 19:26 ` Bjorn Helgaas
2016-09-21  1:15   ` cov
2016-09-21 13:11     ` Bjorn Helgaas
2016-09-21 14:07       ` Sinan Kaya
2016-09-21 17:31         ` Bjorn Helgaas
2016-09-21 17:34           ` Sinan Kaya
2016-09-21 22:38           ` [PATCHv2] PCI: QDF2432 32 bit config space accessors Christopher Covington
2016-10-31 21:48             ` Bjorn Helgaas
2016-11-01 13:06               ` cov
2016-11-02 16:08                 ` Bjorn Helgaas
2016-11-02 16:36                   ` Sinan Kaya
2016-11-03 14:00                     ` Bjorn Helgaas
2016-11-03 16:58                       ` Sinan Kaya [this message]
2016-11-03 17:06                         ` Sinan Kaya
2016-11-03 20:43                         ` Bjorn Helgaas
2016-11-03 23:49                           ` Sinan Kaya
2016-12-02  4:58                       ` Jon Masters
2016-11-02 16:41                   ` Bjorn Helgaas
2016-11-09 19:25                   ` Christopher Covington
2016-11-09 20:06                     ` Bjorn Helgaas
2016-11-09 20:29                       ` Ard Biesheuvel
2016-11-09 22:49                         ` Bjorn Helgaas
2016-11-10 10:25                           ` Ard Biesheuvel
2016-11-10 13:57                             ` Lorenzo Pieralisi
2016-11-10 17:42                             ` Bjorn Helgaas
2016-12-02  5:12                               ` Jon Masters
2016-09-21 22:40       ` [PATCH V6 0/5] ECAM quirks handling for ARM64 platforms Christopher Covington
2016-09-22 23:08         ` Bjorn Helgaas
2016-09-23 18:41           ` Christopher Covington
2016-09-23 19:17             ` Bjorn Helgaas
2016-09-23 19:22               ` Christopher Covington
2016-11-24 11:05 ` [PATCH V6 1/1] ARM64/PCI: Manage controller-specific information on the host controller basis Tomasz Nowicki
2016-11-29 23:40   ` Bjorn Helgaas

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=aa8bc916-9363-2de7-2997-4ce470562b2c@codeaurora.org \
    --to=okaya@codeaurora.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=andrea.gallo@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=cov@codeaurora.org \
    --cc=ddaney@caviumnetworks.com \
    --cc=dhdang@apm.com \
    --cc=gabriele.paoloni@huawei.com \
    --cc=hanjun.guo@linaro.org \
    --cc=helgaas@kernel.org \
    --cc=jchandra@broadcom.com \
    --cc=jcm@redhat.com \
    --cc=jeremy.linton@arm.com \
    --cc=jhugo@codeaurora.org \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liudongdong3@huawei.com \
    --cc=msalter@redhat.com \
    --cc=mw@semihalf.com \
    --cc=rafael@kernel.org \
    --cc=robert.richter@caviumnetworks.com \
    --cc=tn@semihalf.com \
    --cc=wangyijing@huawei.com \
    --cc=will.deacon@arm.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

Powered by JetHome