From: Jesse Barnes on
On Mon, 08 Feb 2010 15:44:18 -0700
Bjorn Helgaas <bjorn.helgaas(a)hp.com> wrote:

> Historically, Linux has assumed a single PCI host bridge, with that
> bridge claiming all the address space left after RAM and legacy
> devices are taken out.
>
> If the system contains multiple host bridges, we can no longer
> operate under that assumption. We have to know what parts of the
> address space are claimed by each bridge so that when we assign
> resources to a PCI device, we take them from a range claimed by the
> upstream host bridge.
>
> We use ACPI to enumerate all the PCI host bridges in the system, and
> part of the host bridge description is the "_CRS" (current resource
> settings" property, which lists the address space used by the
> bridge. On x86, we currently ignore most of the _CRS information.
> This patch series changes this, so we will use _CRS to learn about
> the host bridge windows.
>
> Since most x86 machines with multiple host bridges are relatively
> new, this series only turns this on for machines with BIOS dates of
> 2010 or newer and for a few machines we know to require it.
>
> These apply on be6e9f7853e. I added an initial patch to clean up the
> formatting of the disabled window printk.
>
> Changes since v1:
> - rebase to be6e9f7853e
> - add patch to clean up "disabled window" printk
> - add bugzilla reference comment in use_crs DMI quirk

A 2010 default is probably too conservative, but we can always add a
whitelist or change the default later. Applied the series to my
linux-next branch, thanks.

--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Gary Hade on
On Wed, Feb 17, 2010 at 01:19:47PM -0700, Bjorn Helgaas wrote:
> Historically, Linux has assumed a single PCI host bridge, with that bridge
> claiming all the address space left after RAM and legacy devices are taken out.
>
> If the system contains multiple host bridges, we can no longer operate under
> that assumption. We have to know what parts of the address space are claimed
> by each bridge so that when we assign resources to a PCI device, we take them
> from a range claimed by the upstream host bridge.
>
> On x86 and ia64, we use ACPI to enumerate all the PCI host bridges in the
> system, and part of the host bridge description is the "_CRS" (current resource
> settings" property, which lists the address space used by the bridge. On x86,
> we currently ignore most of the _CRS information. This patch series changes
> this, so we will use _CRS to learn about the host bridge windows.
>
> Since most x86 machines with multiple host bridges are relatively new, this
> series only turns this on for machines with BIOS dates of 2008 or newer.

I just tried your changes on an IBM x3850 with a 12/01/2008 BIOS
date. After booting without pci=use_crs I observed the expected
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
message. I then loaded 'acpiphp' and was able to successfully
hot-remove and hot-add PCI-X and PCIe cards. Without pci=use_crs
a hot-add operation would have previously caused a machine check.

Tested-by: Gary Hade <garyhade(a)us.ibm.com>

Gary

--
Gary Hade
System x Enablement
IBM Linux Technology Center
503-578-4503 IBM T/L: 775-4503
garyhade(a)us.ibm.com
http://www.ibm.com/linux/ltc

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Jesse Barnes on
On Tue, 23 Feb 2010 10:24:15 -0700
Bjorn Helgaas <bjorn.helgaas(a)hp.com> wrote:

> Historically, Linux has assumed a single PCI host bridge, with that
> bridge claiming all the address space left after RAM and legacy
> devices are taken out.
>
> If the system contains multiple host bridges, we can no longer
> operate under that assumption. We have to know what parts of the
> address space are claimed by each bridge so that when we assign
> resources to a PCI device, we take them from a range claimed by the
> upstream host bridge.
>
> On x86 and ia64, we use ACPI to enumerate all the PCI host bridges in
> the system, and part of the host bridge description is the
> "_CRS" (current resource settings" property, which lists the address
> space used by the bridge. On x86, we currently ignore most of the
> _CRS information. This patch series changes this, so we will use
> _CRS to learn about the host bridge windows.
>
> Since most x86 machines with multiple host bridges are relatively
> new, this series only turns this on for machines with BIOS dates of
> 2008 or newer.
>
> Changes from v4 to v5:
> - Add EXPORT_SYMBOL_GPL(pci_bus_resource_n) for module builds.

Thanks, it built this time. Pushed to my linux-next branch.

--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/