2005-09-09 02:36:57

by Chuck Ebbert

[permalink] [raw]
Subject: [patch 2.6.13] x86: check host bridge when applying vendor quirks

I was looking at the i386 ACPI early quirk code and x86_64 equivalent
and it seems to me it should be checking the host bridge vendor, not
the one for various PCI bridges. Nvidia might release some kind of
PCI card with an embedded bridge that would break this code, for
example. I made this patch but I can't test it:

Signed-off-by: Chuck Ebbert <[email protected]>

arch/i386/kernel/acpi/earlyquirk.c | 2 +-
arch/x86_64/kernel/io_apic.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

--- 2.6.13a.orig/arch/i386/kernel/acpi/earlyquirk.c
+++ 2.6.13a/arch/i386/kernel/acpi/earlyquirk.c
@@ -36,7 +36,7 @@ void __init check_acpi_pci(void)
if (class == 0xffffffff)
break;

- if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
+ if ((class >> 16) != PCI_CLASS_BRIDGE_HOST)
continue;

vendor = read_pci_config(num, slot, func,
--- 2.6.13a.orig/arch/x86_64/kernel/io_apic.c
+++ 2.6.13a/arch/x86_64/kernel/io_apic.c
@@ -242,7 +242,7 @@ void __init check_ioapic(void)
if (class == 0xffffffff)
break;

- if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
+ if ((class >> 16) != PCI_CLASS_BRIDGE_HOST)
continue;

vendor = read_pci_config(num, slot, func,
__
Chuck


2005-09-09 02:47:17

by Andi Kleen

[permalink] [raw]
Subject: Re: [patch 2.6.13] x86: check host bridge when applying vendor quirks

On Friday 09 September 2005 04:33, Chuck Ebbert wrote:
> I was looking at the i386 ACPI early quirk code and x86_64 equivalent
> and it seems to me it should be checking the host bridge vendor, not
> the one for various PCI bridges. Nvidia might release some kind of
> PCI card with an embedded bridge that would break this code, for
> example. I made this patch but I can't test it:

It's wrong. On AMD K8 systems the host bridge is always from
AMD because the Northbridge is part of the CPU.

-Andi

2005-09-09 04:46:20

by Chuck Ebbert

[permalink] [raw]
Subject: Re: [patch 2.6.13] x86: check host bridge when applying vendor quirks

In-Reply-To: <[email protected]>

On Fri, 9 Sep 2005 at 04:47:09 +0200, Andi Kleen wrote:

> On Friday 09 September 2005 04:33, Chuck Ebbert wrote:
> > I was looking at the i386 ACPI early quirk code and x86_64 equivalent
> > and it seems to me it should be checking the host bridge vendor, not
> > the one for various PCI bridges. Nvidia might release some kind of
> > PCI card with an embedded bridge that would break this code, for
> > example. I made this patch but I can't test it:
>
> It's wrong. On AMD K8 systems the host bridge is always from
> AMD because the Northbridge is part of the CPU.

It's at least right on my system:

00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 01)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
__
Chuck

2005-09-09 05:19:49

by Piter PUNK

[permalink] [raw]
Subject: Re: [patch 2.6.13] x86: check host bridge when applying vendor quirks

Andi Kleen wrote:
> On Friday 09 September 2005 04:33, Chuck Ebbert wrote:
>
>>I was looking at the i386 ACPI early quirk code and x86_64 equivalent
>>and it seems to me it should be checking the host bridge vendor, not
>>the one for various PCI bridges. Nvidia might release some kind of
>>PCI card with an embedded bridge that would break this code, for
>>example. I made this patch but I can't test it:
>
> It's wrong. On AMD K8 systems the host bridge is always from
> AMD because the Northbridge is part of the CPU.

Hmmm... no.

root@Weasley:/etc# lspci
00:00.0 Host bridge: ATI Technologies Inc: Unknown device 5950
<...many things...>
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
Miscellaneous Control

The Athlon64 machines has an external host bridge. You can look the
ATI Host Bridge in the first line of lspci.

Piter PUNK

2005-09-09 06:07:13

by Andi Kleen

[permalink] [raw]
Subject: Re: [patch 2.6.13] x86: check host bridge when applying vendor quirks

On Friday 09 September 2005 07:19, Piter PUNK wrote:

> Hmmm... no.

Yes. e.g. the Machines with AMD 8111 or Nvidia chipsets don't have another
Hostbridge.

>> root@Weasley:/etc# lspci
> 00:00.0 Host bridge: ATI Technologies Inc: Unknown device 5950
> <...many things...>
> 00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
> HyperTransport Technology Configuration
> 00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
> Address Map
> 00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
> DRAM Controller
> 00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron]
> Miscellaneous Control
>
> The Athlon64 machines has an external host bridge. You can look the
> ATI Host Bridge in the first line of lspci.

Maybe your ATI chipset, but not in general.

-Andi