Re: [PATCH, resend] x86/PCI: don't export a __devinit function

From: Jesse Barnes
Date: Tue Feb 22 2011 - 18:25:49 EST


On Fri, 18 Feb 2011 09:12:11 +0000
"Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

> Like this:
>
> --- a/arch/x86/pci/mmconfig-shared.c
> +++ b/arch/x86/pci/mmconfig-shared.c
> @@ -606,6 +606,16 @@ static void __init __pci_mmcfg_init(int
> if (list_empty(&pci_mmcfg_list))
> return;
>
> + if (pcibios_last_bus < 0) {
> + const struct pci_mmcfg_region *cfg;
> +
> + list_for_each_entry(cfg, &pci_mmcfg_list, list) {
> + if (cfg->segment)
> + break;
> + pcibios_last_bus = cfg->end_bus;
> + }
> + }
> +
> if (pci_mmcfg_arch_init())
> pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
> else {
>
> I (unsuccessfully so far) tried to find someone at Intel who could
> confirm that this approach is usable namely on those Xeon 55xx
> systems that the edac driver tries to deal with, which is why I
> didn't submit this so far.

What's the actual user of pcibios_last_bus we're concerned about here?
Presumably pcibios_fixup_peer_bridges(), since that's the only place
that might be affected by a positive value...

So in that sense, the above seems like a good fix; we should initialize
pcibios_last_bus to a reasonable value based on the configuration we
discover in the MCFG table.

--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/