From: Don Dutile <ddutile@redhat.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Yinghai Lu <yinghai@kernel.org>,
Taku Izumi <izumi.taku@jp.fujitsu.com>,
Jiang Liu <jiang.liu@huawei.com>,
Keping Chen <chenkeping@huawei.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH V4 0/6] PCI, x86: update MMCFG information when hot-plugging PCI host bridges
Date: Mon, 16 Apr 2012 11:30:20 -0400 [thread overview]
Message-ID: <4F8C3B0C.4080606@redhat.com> (raw)
In-Reply-To: <4F883956.2040200@gmail.com>
On 04/13/2012 10:33 AM, Jiang Liu wrote:
> On 04/13/2012 06:48 PM, Kenji Kaneshige wrote:
>> (2012/04/12 9:06), Bjorn Helgaas wrote:
>>> On Wed, Apr 11, 2012 at 9:34 AM, Jiang Liu<liuj97@gmail.com> wrote:
>>>> On 04/11/2012 08:05 PM, Kenji Kaneshige wrote:
>>>>> (2012/04/11 13:02), Bjorn Helgaas wrote:
>>>>>> On Tue, Apr 10, 2012 at 6:10 PM, Jiang Liu<liuj97@gmail.com> wrote:
>>>>>>> This patchset enhance pci_root driver to update MMCFG information when
>>>>>>> hot-plugging PCI root bridges. It applies to Yinghai's tree at
>>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug
>>>>>>>
>>>>>>> The second patch is based on Taku Izumi work with some enhancements to
>>>>>>> correctly handle PCI host bridges without _CBA method.
>>>>>>
>>>>>> I'm sorry I won't have time to really review these for a couple weeks.
>>>>>>
>>>>>> It always seemed wrong to me that we parse MCFG and set things up
>>>>>> before we even look at PNP0A03/PNP0A08 devices. It would make more
>>>>>> sense to me to have something in acpi_pci_root_add() to set up
>>>>>> MMCONFIG using _CBA if available, and falling back to parsing MCFG if
>>>>>> it's not.
>>>>>
>>>>> I think your idea could make the code (design) much cleaner.
>>>>> Do you have any other reason why you think "It always seemed
>>>>> wrong..."?
>>>
>>> The current scheme is just an ugly design. Does I need more reasons? :)
>>
>> Ok, I just wanted to know if I'm missing anything we need to
>> take into account when re-factoring the code.
>>
>> By the way, the following code makes me think there could be
>> some hardwares that need a fixup using mmconfig access before
>> scanning the PCI tree. If this is the case, we would need
>> something to enable early mmconfig initialization for those
>> hardwares.
>>
>> static __init int pci_arch_init(void)
>> {
>> ...
>> if (!(pci_probe& PCI_PROBE_NOEARLY))
>> pci_mmcfg_early_init();
>>
>>
>> Regards,
>> Kenji Kaneshige
>
> If MMCFG could be treated as an optional configuration space access method,
> we can refine the MMCFG code according to Bjorn's suggestion. And as Kenji
> has mentioned, there may be some risks ahead. So need more confirmation
> from other PCI experts here.
>
I looked at the thread, but didn't know which suggestion of Bjorn's you were referring to.
But, mmcfg access to PCI config space is need for any cap structure
greater than 256 byte offset. A number of devices have cap structures
in this upper PCI config space, esp. SRIOV devices.
So, if 'optional MMCFG' only means at the beginning of kernel scanning of
PCI (pass-0 scanning), that should be ok, but in-depth, pass-1 scanning
of PCIe devices may require MMCFG for full functional support.
> It may be a good idea to ping the ACPI community to check whether ACPICA
> has any dependency on the MMCFG mechanism too.
>
> Thanks
> Gerry
>
>>
>>
>>
>>>
>>>> Yeah, that may lead to a cleaner design.
>>>> But there are still some special cases, such as:
>>>> 1) ACPI subsystem is disabled by kernel boot options, so we can't rely
>>>> on the ACPI pci_root driver to initialize the MMCFG.
>>>
>>> I don't think it's a requirement to make everything work with
>>> "acpi=off". On a system with ACPI, running with "acpi=off" is just a
>>> kludge and if things work at all, it's only because we're very lucky.
>>>
>>>> 2) Some PCI host bridges are not reported by the ACPI namespace. My partner
>>>> has observed a system which doesn't report the host bridges embedded in the
>>>> NHM-EX processors.
>>>
>>> I don't think it's a requirement for Linux to use PCI devices behind
>>> unreported host bridges. I'd like to pick a date and say "after BIOS
>>> date X, we will no longer blindly probe for these unreported host
>>> bridges."
>>>
>>> Bjorn
>>>
>>
>
> --
> 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
next prev parent reply other threads:[~2012-04-16 15:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 0:10 [PATCH V4 0/6] PCI, x86: update MMCFG information when hot-plugging PCI host bridges Jiang Liu
2012-04-11 0:10 ` [PATCH V4 1/6] PCI, x86: split out pci_mmcfg_check_reserved() for code reuse Jiang Liu
2012-04-11 0:10 ` [PATCH V4 2/6] PCI, x86: split out pci_mmconfig_alloc() " Jiang Liu
2012-04-11 0:11 ` [PATCH V4 3/6] PCI, x86: use RCU list to protect mmconfig list Jiang Liu
2012-04-11 0:11 ` [PATCH V4 4/6] PCI, x86: introduce pci_mmcfg_arch_map()/pci_mmcfg_arch_unmap() Jiang Liu
2012-04-11 0:11 ` [PATCH V4 5/6] PCI, x86: introduce pci_mmconfig_insert()/delete() for PCI root bridge hotplug Jiang Liu
2012-04-11 0:11 ` [PATCH V4 6/6] PCI, ACPI, x86: update MMCFG information when hot-plugging PCI host bridges Jiang Liu
2012-04-18 6:47 ` Taku Izumi
2012-04-18 7:49 ` Jiang Liu
2012-04-19 6:49 ` Taku Izumi
2012-04-19 7:04 ` Jiang Liu
2012-04-11 4:02 ` [PATCH V4 0/6] PCI, " Bjorn Helgaas
2012-04-11 12:05 ` Kenji Kaneshige
2012-04-11 15:34 ` Jiang Liu
2012-04-12 0:06 ` Bjorn Helgaas
2012-04-13 10:48 ` Kenji Kaneshige
2012-04-13 14:33 ` Jiang Liu
2012-04-16 15:30 ` Don Dutile [this message]
2012-04-16 16:09 ` Jiang Liu
2012-04-16 17:54 ` Don Dutile
2012-04-23 17:41 ` Bjorn Helgaas
2012-04-23 18:50 ` Don Dutile
2012-04-25 16:50 ` Bjorn Helgaas
2012-04-26 3:35 ` Don Dutile
2012-04-26 3:53 ` Jiang Liu
2012-04-26 4:02 ` Jiang Liu
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=4F8C3B0C.4080606@redhat.com \
--to=ddutile@redhat.com \
--cc=bhelgaas@google.com \
--cc=chenkeping@huawei.com \
--cc=izumi.taku@jp.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=yinghai@kernel.org \
/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).