diff options
author | Andi Kleen <ak@suse.de> | 2006-12-09 15:33:35 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-09 15:33:35 -0500 |
commit | 16d279d277aedd640d9dba5ddeb172b5e6bc7d75 (patch) | |
tree | 278167bf2f3f837e2cebfca999116f64cf95f591 | |
parent | e0f27981f2d5fd93b2795e8348327b081c512f83 (diff) |
[PATCH] x86: Fix verify_quirk_intel_irqbalance()
Fix verify_quirk_intel_irqbalance(). genapic checks should really
happen only on affected versions of the E7520/E7320/E7525 based platforms.
AK: This should akpm's Coyote SDV
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r-- | arch/i386/kernel/quirks.c | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c index a01320a7b636..34874c398b44 100644 --- a/arch/i386/kernel/quirks.c +++ b/arch/i386/kernel/quirks.c | |||
@@ -10,13 +10,38 @@ | |||
10 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) | 10 | #if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) |
11 | static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) | 11 | static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) |
12 | { | 12 | { |
13 | u8 config, rev; | ||
14 | u32 word; | ||
15 | |||
16 | /* BIOS may enable hardware IRQ balancing for | ||
17 | * E7520/E7320/E7525(revision ID 0x9 and below) | ||
18 | * based platforms. | ||
19 | * For those platforms, make sure that the genapic is set to 'flat' | ||
20 | */ | ||
21 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); | ||
22 | if (rev > 0x9) | ||
23 | return; | ||
24 | |||
25 | /* enable access to config space*/ | ||
26 | pci_read_config_byte(dev, 0xf4, &config); | ||
27 | pci_write_config_byte(dev, 0xf4, config|0x2); | ||
28 | |||
29 | /* read xTPR register */ | ||
30 | raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); | ||
31 | |||
32 | if (!(word & (1 << 13))) { | ||
13 | #ifdef CONFIG_X86_64 | 33 | #ifdef CONFIG_X86_64 |
14 | if (genapic != &apic_flat) | 34 | if (genapic != &apic_flat) |
15 | panic("APIC mode must be flat on this system\n"); | 35 | panic("APIC mode must be flat on this system\n"); |
16 | #elif defined(CONFIG_X86_GENERICARCH) | 36 | #elif defined(CONFIG_X86_GENERICARCH) |
17 | if (genapic != &apic_default) | 37 | if (genapic != &apic_default) |
18 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); | 38 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); |
19 | #endif | 39 | #endif |
40 | } | ||
41 | |||
42 | /* put back the original value for config space*/ | ||
43 | if (!(config & 0x2)) | ||
44 | pci_write_config_byte(dev, 0xf4, config); | ||
20 | } | 45 | } |
21 | 46 | ||
22 | void __init quirk_intel_irqbalance(void) | 47 | void __init quirk_intel_irqbalance(void) |