diff options
author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:59:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:59:11 -0500 |
commit | 4522d58275f124105819723e24e912c8e5bf3cdd (patch) | |
tree | b92c29014fadffe049c1925676037f0092b8d112 /arch/i386/kernel/quirks.c | |
parent | 6cf24f031bc97cb5a7c9df3b6e73c45b628b2b28 (diff) | |
parent | 64a26a731235b59c9d73bbe82c1f896d57400d37 (diff) |
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits)
[PATCH] x86-64: Export smp_call_function_single
[PATCH] i386: Clean up smp_tune_scheduling()
[PATCH] unwinder: move .eh_frame to RODATA
[PATCH] unwinder: fully support linker generated .eh_frame_hdr section
[PATCH] x86-64: don't use set_irq_regs()
[PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq
[PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM
[PATCH] i386: replace kmalloc+memset with kzalloc
[PATCH] x86-64: remove remaining pc98 code
[PATCH] x86-64: remove unused variable
[PATCH] x86-64: Fix constraints in atomic_add_return()
[PATCH] x86-64: fix asm constraints in i386 atomic_add_return
[PATCH] x86-64: Correct documentation for bzImage protocol v2.05
[PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code
[PATCH] x86-64: Fix numaq build error
[PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header
[PATCH] unwinder: Add debugging output to the Dwarf2 unwinder
[PATCH] x86-64: Clarify error message in GART code
[PATCH] x86-64: Fix interrupt race in idle callback (3rd try)
[PATCH] x86-64: Remove unwind stack pointer alignment forcing again
...
Fixed conflict in include/linux/uaccess.h manually
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/quirks.c')
-rw-r--r-- | arch/i386/kernel/quirks.c | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c index 9f6ab1789bb0..a01320a7b636 100644 --- a/arch/i386/kernel/quirks.c +++ b/arch/i386/kernel/quirks.c | |||
@@ -3,10 +3,23 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/pci.h> | 4 | #include <linux/pci.h> |
5 | #include <linux/irq.h> | 5 | #include <linux/irq.h> |
6 | #include <asm/pci-direct.h> | ||
7 | #include <asm/genapic.h> | ||
8 | #include <asm/cpu.h> | ||
6 | 9 | ||
7 | #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) | ||
12 | { | ||
13 | #ifdef CONFIG_X86_64 | ||
14 | if (genapic != &apic_flat) | ||
15 | panic("APIC mode must be flat on this system\n"); | ||
16 | #elif defined(CONFIG_X86_GENERICARCH) | ||
17 | if (genapic != &apic_default) | ||
18 | panic("APIC mode must be default(flat) on this system. Use apic=default\n"); | ||
19 | #endif | ||
20 | } | ||
8 | 21 | ||
9 | static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | 22 | void __init quirk_intel_irqbalance(void) |
10 | { | 23 | { |
11 | u8 config, rev; | 24 | u8 config, rev; |
12 | u32 word; | 25 | u32 word; |
@@ -16,18 +29,18 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
16 | * based platforms. | 29 | * based platforms. |
17 | * Disable SW irqbalance/affinity on those platforms. | 30 | * Disable SW irqbalance/affinity on those platforms. |
18 | */ | 31 | */ |
19 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &rev); | 32 | rev = read_pci_config_byte(0, 0, 0, PCI_CLASS_REVISION); |
20 | if (rev > 0x9) | 33 | if (rev > 0x9) |
21 | return; | 34 | return; |
22 | 35 | ||
23 | printk(KERN_INFO "Intel E7520/7320/7525 detected."); | 36 | printk(KERN_INFO "Intel E7520/7320/7525 detected."); |
24 | 37 | ||
25 | /* enable access to config space*/ | 38 | /* enable access to config space */ |
26 | pci_read_config_byte(dev, 0xf4, &config); | 39 | config = read_pci_config_byte(0, 0, 0, 0xf4); |
27 | pci_write_config_byte(dev, 0xf4, config|0x2); | 40 | write_pci_config_byte(0, 0, 0, 0xf4, config|0x2); |
28 | 41 | ||
29 | /* read xTPR register */ | 42 | /* read xTPR register */ |
30 | raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word); | 43 | word = read_pci_config_16(0, 0, 0x40, 0x4c); |
31 | 44 | ||
32 | if (!(word & (1 << 13))) { | 45 | if (!(word & (1 << 13))) { |
33 | printk(KERN_INFO "Disabling irq balancing and affinity\n"); | 46 | printk(KERN_INFO "Disabling irq balancing and affinity\n"); |
@@ -38,13 +51,24 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
38 | #ifdef CONFIG_PROC_FS | 51 | #ifdef CONFIG_PROC_FS |
39 | no_irq_affinity = 1; | 52 | no_irq_affinity = 1; |
40 | #endif | 53 | #endif |
54 | #ifdef CONFIG_HOTPLUG_CPU | ||
55 | printk(KERN_INFO "Disabling cpu hotplug control\n"); | ||
56 | enable_cpu_hotplug = 0; | ||
57 | #endif | ||
58 | #ifdef CONFIG_X86_64 | ||
59 | /* force the genapic selection to flat mode so that | ||
60 | * interrupts can be redirected to more than one CPU. | ||
61 | */ | ||
62 | genapic_force = &apic_flat; | ||
63 | #endif | ||
41 | } | 64 | } |
42 | 65 | ||
43 | /* put back the original value for config space*/ | 66 | /* put back the original value for config space */ |
44 | if (!(config & 0x2)) | 67 | if (!(config & 0x2)) |
45 | pci_write_config_byte(dev, 0xf4, config); | 68 | write_pci_config_byte(0, 0, 0, 0xf4, config); |
46 | } | 69 | } |
47 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); | 70 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, verify_quirk_intel_irqbalance); |
48 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); | 71 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, verify_quirk_intel_irqbalance); |
49 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_intel_irqbalance); | 72 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, verify_quirk_intel_irqbalance); |
73 | |||
50 | #endif | 74 | #endif |