Re: [PATCH] x86: use PCI method for enabling AMD extended config space before MSR method

From: Jan Beulich
Date: Fri Jan 07 2011 - 02:40:25 EST


>>> On 06.01.11 at 18:20, Robert Richter <robert.richter@xxxxxxx> wrote:
> On 06.01.11 11:57:35, Jan Beulich wrote:
>> +#ifdef CONFIG_AMD_NB
>> + /* Try the PCI method first. */
>> + if (early_pci_allowed()) {
>> + unsigned int i, n;
>> +
>> + for (n = i = 0; !n && amd_bus_dev_ranges[i].dev_limit; ++i) {
>> + u8 bus = amd_bus_dev_ranges[i].bus;
>> + u8 slot = amd_bus_dev_ranges[i].dev_base;
>> + u8 limit = amd_bus_dev_ranges[i].dev_limit;
>> +
>> + for (; slot < limit; ++slot) {
>> + u32 val = read_pci_config(bus, slot, 3, 0);
>> +
>> + if (!early_is_k8_nb(val))
>> + continue;
>> +
>> + val = read_pci_config(bus, slot, 3, 0x8c);
>> + if (!(val & (ENABLE_CF8_EXT_CFG >> 32))) {
>> + val |= ENABLE_CF8_EXT_CFG >> 32;
>> + write_pci_config(bus, slot, 3, 0x8c,
>> + val);
>> + }
>> + ++n;
>> + }
>> + }
>> + pr_info("Extended Config Space enabled on %u nodes\n", n);
>
> Isn't i the number of nodes?

No, "i" is the number of PCI devices looked at (but only those that
pass early_is_k8_nb() are of interest).

Jan

--
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/