diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:20:36 -0400 |
commit | 765426e8ee4c0ab2bc9d44951f4865b8494cdbd0 (patch) | |
tree | 2b46ab8953eff175c8d3474a9754c1ab1394e4de /arch/x86 | |
parent | 36ec891895020f3bc9953c8b11d079c6d77d76bd (diff) | |
parent | 898b054f3eec5921320ae8614b5bdd7b07ea5b43 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (123 commits)
dock: make dock driver not a module
ACPI: fix ia64 build warning
ACPI: hack around sysfs warning with link order
ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n
intel_menlo: fix build warning
panasonic-laptop: fix build
ACPICA: Update version to 20080926
ACPICA: Add support for zero-length buffer-to-string conversions
ACPICA: New: Validation for predefined ACPI methods/objects
ACPICA: Fix for implicit return compatibility
ACPICA: Fixed a couple memory leaks associated with "implicit return"
ACPICA: Optimize buffer allocation procedure
ACPICA: Fix possible memory leak, error exit path
ACPICA: Fix fault after mem allocation failure in AML parser
ACPICA: Remove unused ACPI register bit definition
ACPICA: Update version to 20080829
ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname
ACPICA: Cleanup for internal Reference Object
ACPICA: Update comments - no functional changes
ACPICA: Update for Reference ACPI_OPERAND_OBJECT
...
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/Kconfig | 5 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/sleep.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 42 | ||||
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 55 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 7 |
7 files changed, 96 insertions, 25 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5b9b12321ad1..350bee1d54dc 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -116,6 +116,9 @@ config GENERIC_TIME_VSYSCALL | |||
116 | config ARCH_HAS_CPU_RELAX | 116 | config ARCH_HAS_CPU_RELAX |
117 | def_bool y | 117 | def_bool y |
118 | 118 | ||
119 | config ARCH_HAS_DEFAULT_IDLE | ||
120 | def_bool y | ||
121 | |||
119 | config ARCH_HAS_CACHE_LINE_SIZE | 122 | config ARCH_HAS_CACHE_LINE_SIZE |
120 | def_bool y | 123 | def_bool y |
121 | 124 | ||
@@ -1635,6 +1638,8 @@ source "arch/x86/kernel/cpu/cpufreq/Kconfig" | |||
1635 | 1638 | ||
1636 | source "drivers/cpuidle/Kconfig" | 1639 | source "drivers/cpuidle/Kconfig" |
1637 | 1640 | ||
1641 | source "drivers/idle/Kconfig" | ||
1642 | |||
1638 | endmenu | 1643 | endmenu |
1639 | 1644 | ||
1640 | 1645 | ||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 0d1c26a583c5..53b01a1ae10c 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -153,12 +153,13 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size) | |||
153 | } | 153 | } |
154 | 154 | ||
155 | #ifdef CONFIG_PCI_MMCONFIG | 155 | #ifdef CONFIG_PCI_MMCONFIG |
156 | |||
157 | static int acpi_mcfg_64bit_base_addr __initdata = FALSE; | ||
158 | |||
156 | /* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ | 159 | /* The physical address of the MMCONFIG aperture. Set from ACPI tables. */ |
157 | struct acpi_mcfg_allocation *pci_mmcfg_config; | 160 | struct acpi_mcfg_allocation *pci_mmcfg_config; |
158 | int pci_mmcfg_config_num; | 161 | int pci_mmcfg_config_num; |
159 | 162 | ||
160 | static int acpi_mcfg_64bit_base_addr __initdata = FALSE; | ||
161 | |||
162 | static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg) | 163 | static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg) |
163 | { | 164 | { |
164 | if (!strcmp(mcfg->header.oem_id, "SGI")) | 165 | if (!strcmp(mcfg->header.oem_id, "SGI")) |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index c44cd6dbfa14..806b4e9051b4 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -22,7 +22,7 @@ unsigned long acpi_realmode_flags; | |||
22 | static unsigned long acpi_realmode; | 22 | static unsigned long acpi_realmode; |
23 | 23 | ||
24 | #if defined(CONFIG_SMP) && defined(CONFIG_64BIT) | 24 | #if defined(CONFIG_SMP) && defined(CONFIG_64BIT) |
25 | static char temp_stack[10240]; | 25 | static char temp_stack[4096]; |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | /** | 28 | /** |
@@ -98,7 +98,7 @@ int acpi_save_state_mem(void) | |||
98 | #else /* CONFIG_64BIT */ | 98 | #else /* CONFIG_64BIT */ |
99 | header->trampoline_segment = setup_trampoline() >> 4; | 99 | header->trampoline_segment = setup_trampoline() >> 4; |
100 | #ifdef CONFIG_SMP | 100 | #ifdef CONFIG_SMP |
101 | stack_start.sp = temp_stack + 4096; | 101 | stack_start.sp = temp_stack + sizeof(temp_stack); |
102 | early_gdt_descr.address = | 102 | early_gdt_descr.address = |
103 | (unsigned long)get_cpu_gdt_table(smp_processor_id()); | 103 | (unsigned long)get_cpu_gdt_table(smp_processor_id()); |
104 | #endif | 104 | #endif |
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index c24c4a487b7c..8e48c5d4467d 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -780,6 +780,9 @@ static int __init acpi_cpufreq_init(void) | |||
780 | { | 780 | { |
781 | int ret; | 781 | int ret; |
782 | 782 | ||
783 | if (acpi_disabled) | ||
784 | return 0; | ||
785 | |||
783 | dprintk("acpi_cpufreq_init\n"); | 786 | dprintk("acpi_cpufreq_init\n"); |
784 | 787 | ||
785 | ret = acpi_cpufreq_early_init(); | 788 | ret = acpi_cpufreq_early_init(); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 008d23ba491b..d3dcd58b87cd 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #define PFX "powernow-k8: " | 47 | #define PFX "powernow-k8: " |
48 | #define BFX PFX "BIOS error: " | ||
49 | #define VERSION "version 2.20.00" | 48 | #define VERSION "version 2.20.00" |
50 | #include "powernow-k8.h" | 49 | #include "powernow-k8.h" |
51 | 50 | ||
@@ -536,35 +535,40 @@ static int check_pst_table(struct powernow_k8_data *data, struct pst_s *pst, u8 | |||
536 | 535 | ||
537 | for (j = 0; j < data->numps; j++) { | 536 | for (j = 0; j < data->numps; j++) { |
538 | if (pst[j].vid > LEAST_VID) { | 537 | if (pst[j].vid > LEAST_VID) { |
539 | printk(KERN_ERR PFX "vid %d invalid : 0x%x\n", j, pst[j].vid); | 538 | printk(KERN_ERR FW_BUG PFX "vid %d invalid : 0x%x\n", |
539 | j, pst[j].vid); | ||
540 | return -EINVAL; | 540 | return -EINVAL; |
541 | } | 541 | } |
542 | if (pst[j].vid < data->rvo) { /* vid + rvo >= 0 */ | 542 | if (pst[j].vid < data->rvo) { /* vid + rvo >= 0 */ |
543 | printk(KERN_ERR BFX "0 vid exceeded with pstate %d\n", j); | 543 | printk(KERN_ERR FW_BUG PFX "0 vid exceeded with pstate" |
544 | " %d\n", j); | ||
544 | return -ENODEV; | 545 | return -ENODEV; |
545 | } | 546 | } |
546 | if (pst[j].vid < maxvid + data->rvo) { /* vid + rvo >= maxvid */ | 547 | if (pst[j].vid < maxvid + data->rvo) { /* vid + rvo >= maxvid */ |
547 | printk(KERN_ERR BFX "maxvid exceeded with pstate %d\n", j); | 548 | printk(KERN_ERR FW_BUG PFX "maxvid exceeded with pstate" |
549 | " %d\n", j); | ||
548 | return -ENODEV; | 550 | return -ENODEV; |
549 | } | 551 | } |
550 | if (pst[j].fid > MAX_FID) { | 552 | if (pst[j].fid > MAX_FID) { |
551 | printk(KERN_ERR BFX "maxfid exceeded with pstate %d\n", j); | 553 | printk(KERN_ERR FW_BUG PFX "maxfid exceeded with pstate" |
554 | " %d\n", j); | ||
552 | return -ENODEV; | 555 | return -ENODEV; |
553 | } | 556 | } |
554 | if (j && (pst[j].fid < HI_FID_TABLE_BOTTOM)) { | 557 | if (j && (pst[j].fid < HI_FID_TABLE_BOTTOM)) { |
555 | /* Only first fid is allowed to be in "low" range */ | 558 | /* Only first fid is allowed to be in "low" range */ |
556 | printk(KERN_ERR BFX "two low fids - %d : 0x%x\n", j, pst[j].fid); | 559 | printk(KERN_ERR FW_BUG PFX "two low fids - %d : " |
560 | "0x%x\n", j, pst[j].fid); | ||
557 | return -EINVAL; | 561 | return -EINVAL; |
558 | } | 562 | } |
559 | if (pst[j].fid < lastfid) | 563 | if (pst[j].fid < lastfid) |
560 | lastfid = pst[j].fid; | 564 | lastfid = pst[j].fid; |
561 | } | 565 | } |
562 | if (lastfid & 1) { | 566 | if (lastfid & 1) { |
563 | printk(KERN_ERR BFX "lastfid invalid\n"); | 567 | printk(KERN_ERR FW_BUG PFX "lastfid invalid\n"); |
564 | return -EINVAL; | 568 | return -EINVAL; |
565 | } | 569 | } |
566 | if (lastfid > LO_FID_TABLE_TOP) | 570 | if (lastfid > LO_FID_TABLE_TOP) |
567 | printk(KERN_INFO BFX "first fid not from lo freq table\n"); | 571 | printk(KERN_INFO FW_BUG PFX "first fid not from lo freq table\n"); |
568 | 572 | ||
569 | return 0; | 573 | return 0; |
570 | } | 574 | } |
@@ -672,13 +676,13 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
672 | 676 | ||
673 | dprintk("table vers: 0x%x\n", psb->tableversion); | 677 | dprintk("table vers: 0x%x\n", psb->tableversion); |
674 | if (psb->tableversion != PSB_VERSION_1_4) { | 678 | if (psb->tableversion != PSB_VERSION_1_4) { |
675 | printk(KERN_ERR BFX "PSB table is not v1.4\n"); | 679 | printk(KERN_ERR FW_BUG PFX "PSB table is not v1.4\n"); |
676 | return -ENODEV; | 680 | return -ENODEV; |
677 | } | 681 | } |
678 | 682 | ||
679 | dprintk("flags: 0x%x\n", psb->flags1); | 683 | dprintk("flags: 0x%x\n", psb->flags1); |
680 | if (psb->flags1) { | 684 | if (psb->flags1) { |
681 | printk(KERN_ERR BFX "unknown flags\n"); | 685 | printk(KERN_ERR FW_BUG PFX "unknown flags\n"); |
682 | return -ENODEV; | 686 | return -ENODEV; |
683 | } | 687 | } |
684 | 688 | ||
@@ -705,7 +709,7 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
705 | } | 709 | } |
706 | } | 710 | } |
707 | if (cpst != 1) { | 711 | if (cpst != 1) { |
708 | printk(KERN_ERR BFX "numpst must be 1\n"); | 712 | printk(KERN_ERR FW_BUG PFX "numpst must be 1\n"); |
709 | return -ENODEV; | 713 | return -ENODEV; |
710 | } | 714 | } |
711 | 715 | ||
@@ -1130,17 +1134,19 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1130 | "ACPI Processor module before starting this " | 1134 | "ACPI Processor module before starting this " |
1131 | "driver.\n"); | 1135 | "driver.\n"); |
1132 | #else | 1136 | #else |
1133 | printk(KERN_ERR PFX "Your BIOS does not provide ACPI " | 1137 | printk(KERN_ERR FW_BUG PFX "Your BIOS does not provide" |
1134 | "_PSS objects in a way that Linux understands. " | 1138 | " ACPI _PSS objects in a way that Linux " |
1135 | "Please report this to the Linux ACPI maintainers" | 1139 | "understands. Please report this to the Linux " |
1136 | " and complain to your BIOS vendor.\n"); | 1140 | "ACPI maintainers and complain to your BIOS " |
1141 | "vendor.\n"); | ||
1137 | #endif | 1142 | #endif |
1138 | kfree(data); | 1143 | kfree(data); |
1139 | return -ENODEV; | 1144 | return -ENODEV; |
1140 | } | 1145 | } |
1141 | if (pol->cpu != 0) { | 1146 | if (pol->cpu != 0) { |
1142 | printk(KERN_ERR PFX "No ACPI _PSS objects for CPU other than " | 1147 | printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for " |
1143 | "CPU0. Complain to your BIOS vendor.\n"); | 1148 | "CPU other than CPU0. Complain to your BIOS " |
1149 | "vendor.\n"); | ||
1144 | kfree(data); | 1150 | kfree(data); |
1145 | return -ENODEV; | 1151 | return -ENODEV; |
1146 | } | 1152 | } |
@@ -1193,7 +1199,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1193 | 1199 | ||
1194 | /* min/max the cpu is capable of */ | 1200 | /* min/max the cpu is capable of */ |
1195 | if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { | 1201 | if (cpufreq_frequency_table_cpuinfo(pol, data->powernow_table)) { |
1196 | printk(KERN_ERR PFX "invalid powernow_table\n"); | 1202 | printk(KERN_ERR FW_BUG PFX "invalid powernow_table\n"); |
1197 | powernow_k8_cpu_exit_acpi(data); | 1203 | powernow_k8_cpu_exit_acpi(data); |
1198 | kfree(data->powernow_table); | 1204 | kfree(data->powernow_table); |
1199 | kfree(data); | 1205 | kfree(data); |
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 733c4f8d42ea..3ce029ffaa55 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -95,7 +95,8 @@ static void __init nvidia_bugs(int num, int slot, int func) | |||
95 | 95 | ||
96 | } | 96 | } |
97 | 97 | ||
98 | static u32 ati_ixp4x0_rev(int num, int slot, int func) | 98 | #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC) |
99 | static u32 __init ati_ixp4x0_rev(int num, int slot, int func) | ||
99 | { | 100 | { |
100 | u32 d; | 101 | u32 d; |
101 | u8 b; | 102 | u8 b; |
@@ -115,7 +116,6 @@ static u32 ati_ixp4x0_rev(int num, int slot, int func) | |||
115 | 116 | ||
116 | static void __init ati_bugs(int num, int slot, int func) | 117 | static void __init ati_bugs(int num, int slot, int func) |
117 | { | 118 | { |
118 | #if defined(CONFIG_ACPI) && defined (CONFIG_X86_IO_APIC) | ||
119 | u32 d; | 119 | u32 d; |
120 | u8 b; | 120 | u8 b; |
121 | 121 | ||
@@ -138,9 +138,56 @@ static void __init ati_bugs(int num, int slot, int func) | |||
138 | printk(KERN_INFO "If you got timer trouble " | 138 | printk(KERN_INFO "If you got timer trouble " |
139 | "try acpi_use_timer_override\n"); | 139 | "try acpi_use_timer_override\n"); |
140 | } | 140 | } |
141 | #endif | ||
142 | } | 141 | } |
143 | 142 | ||
143 | static u32 __init ati_sbx00_rev(int num, int slot, int func) | ||
144 | { | ||
145 | u32 old, d; | ||
146 | |||
147 | d = read_pci_config(num, slot, func, 0x70); | ||
148 | old = d; | ||
149 | d &= ~(1<<8); | ||
150 | write_pci_config(num, slot, func, 0x70, d); | ||
151 | d = read_pci_config(num, slot, func, 0x8); | ||
152 | d &= 0xff; | ||
153 | write_pci_config(num, slot, func, 0x70, old); | ||
154 | |||
155 | return d; | ||
156 | } | ||
157 | |||
158 | static void __init ati_bugs_contd(int num, int slot, int func) | ||
159 | { | ||
160 | u32 d, rev; | ||
161 | |||
162 | if (acpi_use_timer_override) | ||
163 | return; | ||
164 | |||
165 | rev = ati_sbx00_rev(num, slot, func); | ||
166 | if (rev > 0x13) | ||
167 | return; | ||
168 | |||
169 | /* check for IRQ0 interrupt swap */ | ||
170 | d = read_pci_config(num, slot, func, 0x64); | ||
171 | if (!(d & (1<<14))) | ||
172 | acpi_skip_timer_override = 1; | ||
173 | |||
174 | if (acpi_skip_timer_override) { | ||
175 | printk(KERN_INFO "SB600 revision 0x%x\n", rev); | ||
176 | printk(KERN_INFO "Ignoring ACPI timer override.\n"); | ||
177 | printk(KERN_INFO "If you got timer trouble " | ||
178 | "try acpi_use_timer_override\n"); | ||
179 | } | ||
180 | } | ||
181 | #else | ||
182 | static void __init ati_bugs(int num, int slot, int func) | ||
183 | { | ||
184 | } | ||
185 | |||
186 | static void __init ati_bugs_contd(int num, int slot, int func) | ||
187 | { | ||
188 | } | ||
189 | #endif | ||
190 | |||
144 | #ifdef CONFIG_DMAR | 191 | #ifdef CONFIG_DMAR |
145 | static void __init intel_g33_dmar(int num, int slot, int func) | 192 | static void __init intel_g33_dmar(int num, int slot, int func) |
146 | { | 193 | { |
@@ -176,6 +223,8 @@ static struct chipset early_qrk[] __initdata = { | |||
176 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, | 223 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, fix_hypertransport_config }, |
177 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, | 224 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, |
178 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | 225 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, |
226 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | ||
227 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | ||
179 | #ifdef CONFIG_DMAR | 228 | #ifdef CONFIG_DMAR |
180 | { PCI_VENDOR_ID_INTEL, 0x29c0, | 229 | { PCI_VENDOR_ID_INTEL, 0x29c0, |
181 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, | 230 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index cd8c0ed02b7e..c958120fb1b6 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -63,6 +63,13 @@ void idle_notifier_register(struct notifier_block *n) | |||
63 | { | 63 | { |
64 | atomic_notifier_chain_register(&idle_notifier, n); | 64 | atomic_notifier_chain_register(&idle_notifier, n); |
65 | } | 65 | } |
66 | EXPORT_SYMBOL_GPL(idle_notifier_register); | ||
67 | |||
68 | void idle_notifier_unregister(struct notifier_block *n) | ||
69 | { | ||
70 | atomic_notifier_chain_unregister(&idle_notifier, n); | ||
71 | } | ||
72 | EXPORT_SYMBOL_GPL(idle_notifier_unregister); | ||
66 | 73 | ||
67 | void enter_idle(void) | 74 | void enter_idle(void) |
68 | { | 75 | { |