diff options
Diffstat (limited to 'arch/i386/kernel/acpi')
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 20 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/cstate.c | 7 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/earlyquirk.c | 29 |
3 files changed, 45 insertions, 11 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index ab974ff97073..c8f96cff07c6 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -70,7 +70,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return | |||
70 | 70 | ||
71 | #define PREFIX "ACPI: " | 71 | #define PREFIX "ACPI: " |
72 | 72 | ||
73 | int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ | 73 | int acpi_noirq; /* skip ACPI IRQ initialization */ |
74 | int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ | 74 | int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */ |
75 | int acpi_ht __initdata = 1; /* enable HT */ | 75 | int acpi_ht __initdata = 1; /* enable HT */ |
76 | 76 | ||
@@ -82,6 +82,7 @@ EXPORT_SYMBOL(acpi_strict); | |||
82 | acpi_interrupt_flags acpi_sci_flags __initdata; | 82 | acpi_interrupt_flags acpi_sci_flags __initdata; |
83 | int acpi_sci_override_gsi __initdata; | 83 | int acpi_sci_override_gsi __initdata; |
84 | int acpi_skip_timer_override __initdata; | 84 | int acpi_skip_timer_override __initdata; |
85 | int acpi_use_timer_override __initdata; | ||
85 | 86 | ||
86 | #ifdef CONFIG_X86_LOCAL_APIC | 87 | #ifdef CONFIG_X86_LOCAL_APIC |
87 | static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; | 88 | static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; |
@@ -332,7 +333,7 @@ acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end) | |||
332 | /* | 333 | /* |
333 | * Parse Interrupt Source Override for the ACPI SCI | 334 | * Parse Interrupt Source Override for the ACPI SCI |
334 | */ | 335 | */ |
335 | static void acpi_sci_ioapic_setup(u32 bus_irq, u32 gsi, u16 polarity, u16 trigger) | 336 | static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) |
336 | { | 337 | { |
337 | if (trigger == 0) /* compatible SCI trigger is level */ | 338 | if (trigger == 0) /* compatible SCI trigger is level */ |
338 | trigger = 3; | 339 | trigger = 3; |
@@ -352,13 +353,13 @@ static void acpi_sci_ioapic_setup(u32 bus_irq, u32 gsi, u16 polarity, u16 trigge | |||
352 | * If GSI is < 16, this will update its flags, | 353 | * If GSI is < 16, this will update its flags, |
353 | * else it will create a new mp_irqs[] entry. | 354 | * else it will create a new mp_irqs[] entry. |
354 | */ | 355 | */ |
355 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); | 356 | mp_override_legacy_irq(gsi, polarity, trigger, gsi); |
356 | 357 | ||
357 | /* | 358 | /* |
358 | * stash over-ride to indicate we've been here | 359 | * stash over-ride to indicate we've been here |
359 | * and for later update of acpi_fadt | 360 | * and for later update of acpi_fadt |
360 | */ | 361 | */ |
361 | acpi_sci_override_gsi = bus_irq; | 362 | acpi_sci_override_gsi = gsi; |
362 | return; | 363 | return; |
363 | } | 364 | } |
364 | 365 | ||
@@ -376,7 +377,7 @@ acpi_parse_int_src_ovr(acpi_table_entry_header * header, | |||
376 | acpi_table_print_madt_entry(header); | 377 | acpi_table_print_madt_entry(header); |
377 | 378 | ||
378 | if (intsrc->bus_irq == acpi_fadt.sci_int) { | 379 | if (intsrc->bus_irq == acpi_fadt.sci_int) { |
379 | acpi_sci_ioapic_setup(intsrc->bus_irq, intsrc->global_irq, | 380 | acpi_sci_ioapic_setup(intsrc->global_irq, |
380 | intsrc->flags.polarity, | 381 | intsrc->flags.polarity, |
381 | intsrc->flags.trigger); | 382 | intsrc->flags.trigger); |
382 | return 0; | 383 | return 0; |
@@ -879,7 +880,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
879 | * pretend we got one so we can set the SCI flags. | 880 | * pretend we got one so we can set the SCI flags. |
880 | */ | 881 | */ |
881 | if (!acpi_sci_override_gsi) | 882 | if (!acpi_sci_override_gsi) |
882 | acpi_sci_ioapic_setup(acpi_fadt.sci_int, acpi_fadt.sci_int, 0, 0); | 883 | acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); |
883 | 884 | ||
884 | /* Fill in identity legacy mapings where no override */ | 885 | /* Fill in identity legacy mapings where no override */ |
885 | mp_config_acpi_legacy_irqs(); | 886 | mp_config_acpi_legacy_irqs(); |
@@ -1300,6 +1301,13 @@ static int __init parse_acpi_skip_timer_override(char *arg) | |||
1300 | return 0; | 1301 | return 0; |
1301 | } | 1302 | } |
1302 | early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); | 1303 | early_param("acpi_skip_timer_override", parse_acpi_skip_timer_override); |
1304 | |||
1305 | static int __init parse_acpi_use_timer_override(char *arg) | ||
1306 | { | ||
1307 | acpi_use_timer_override = 1; | ||
1308 | return 0; | ||
1309 | } | ||
1310 | early_param("acpi_use_timer_override", parse_acpi_use_timer_override); | ||
1303 | #endif /* CONFIG_X86_IO_APIC */ | 1311 | #endif /* CONFIG_X86_IO_APIC */ |
1304 | 1312 | ||
1305 | static int __init setup_acpi_sci(char *s) | 1313 | static int __init setup_acpi_sci(char *s) |
diff --git a/arch/i386/kernel/acpi/cstate.c b/arch/i386/kernel/acpi/cstate.c index 20563e52c622..12e937c1ce4b 100644 --- a/arch/i386/kernel/acpi/cstate.c +++ b/arch/i386/kernel/acpi/cstate.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/acpi.h> | 12 | #include <linux/acpi.h> |
13 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
14 | #include <linux/sched.h> | ||
14 | 15 | ||
15 | #include <acpi/processor.h> | 16 | #include <acpi/processor.h> |
16 | #include <asm/acpi.h> | 17 | #include <asm/acpi.h> |
@@ -155,10 +156,8 @@ static int __init ffh_cstate_init(void) | |||
155 | 156 | ||
156 | static void __exit ffh_cstate_exit(void) | 157 | static void __exit ffh_cstate_exit(void) |
157 | { | 158 | { |
158 | if (cpu_cstate_entry) { | 159 | free_percpu(cpu_cstate_entry); |
159 | free_percpu(cpu_cstate_entry); | 160 | cpu_cstate_entry = NULL; |
160 | cpu_cstate_entry = NULL; | ||
161 | } | ||
162 | } | 161 | } |
163 | 162 | ||
164 | arch_initcall(ffh_cstate_init); | 163 | arch_initcall(ffh_cstate_init); |
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c index fe799b11ac0a..4b60af7f91dd 100644 --- a/arch/i386/kernel/acpi/earlyquirk.c +++ b/arch/i386/kernel/acpi/earlyquirk.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/pci-direct.h> | 10 | #include <asm/pci-direct.h> |
11 | #include <asm/acpi.h> | 11 | #include <asm/acpi.h> |
12 | #include <asm/apic.h> | 12 | #include <asm/apic.h> |
13 | #include <asm/irq.h> | ||
13 | 14 | ||
14 | #ifdef CONFIG_ACPI | 15 | #ifdef CONFIG_ACPI |
15 | 16 | ||
@@ -27,11 +28,17 @@ static int __init check_bridge(int vendor, int device) | |||
27 | #ifdef CONFIG_ACPI | 28 | #ifdef CONFIG_ACPI |
28 | /* According to Nvidia all timer overrides are bogus unless HPET | 29 | /* According to Nvidia all timer overrides are bogus unless HPET |
29 | is enabled. */ | 30 | is enabled. */ |
30 | if (vendor == PCI_VENDOR_ID_NVIDIA) { | 31 | if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { |
31 | nvidia_hpet_detected = 0; | 32 | nvidia_hpet_detected = 0; |
32 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); | 33 | acpi_table_parse(ACPI_HPET, nvidia_hpet_check); |
33 | if (nvidia_hpet_detected == 0) { | 34 | if (nvidia_hpet_detected == 0) { |
34 | acpi_skip_timer_override = 1; | 35 | acpi_skip_timer_override = 1; |
36 | printk(KERN_INFO "Nvidia board " | ||
37 | "detected. Ignoring ACPI " | ||
38 | "timer override.\n"); | ||
39 | printk(KERN_INFO "If you got timer trouble " | ||
40 | "try acpi_use_timer_override\n"); | ||
41 | |||
35 | } | 42 | } |
36 | } | 43 | } |
37 | #endif | 44 | #endif |
@@ -43,6 +50,24 @@ static int __init check_bridge(int vendor, int device) | |||
43 | return 0; | 50 | return 0; |
44 | } | 51 | } |
45 | 52 | ||
53 | static void check_intel(void) | ||
54 | { | ||
55 | u16 vendor, device; | ||
56 | |||
57 | vendor = read_pci_config_16(0, 0, 0, PCI_VENDOR_ID); | ||
58 | |||
59 | if (vendor != PCI_VENDOR_ID_INTEL) | ||
60 | return; | ||
61 | |||
62 | device = read_pci_config_16(0, 0, 0, PCI_DEVICE_ID); | ||
63 | #ifdef CONFIG_SMP | ||
64 | if (device == PCI_DEVICE_ID_INTEL_E7320_MCH || | ||
65 | device == PCI_DEVICE_ID_INTEL_E7520_MCH || | ||
66 | device == PCI_DEVICE_ID_INTEL_E7525_MCH) | ||
67 | quirk_intel_irqbalance(); | ||
68 | #endif | ||
69 | } | ||
70 | |||
46 | void __init check_acpi_pci(void) | 71 | void __init check_acpi_pci(void) |
47 | { | 72 | { |
48 | int num, slot, func; | 73 | int num, slot, func; |
@@ -54,6 +79,8 @@ void __init check_acpi_pci(void) | |||
54 | if (!early_pci_allowed()) | 79 | if (!early_pci_allowed()) |
55 | return; | 80 | return; |
56 | 81 | ||
82 | check_intel(); | ||
83 | |||
57 | /* Poor man's PCI discovery */ | 84 | /* Poor man's PCI discovery */ |
58 | for (num = 0; num < 32; num++) { | 85 | for (num = 0; num < 32; num++) { |
59 | for (slot = 0; slot < 32; slot++) { | 86 | for (slot = 0; slot < 32; slot++) { |