aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-26 22:41:28 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-26 22:41:28 -0500
commitff1ea52fa317a5658b6415b25169c5e531f54876 (patch)
tree88fd243ddb02de7e3b2b0f55aba91796785b5a63
parentb5faa4b89e4d83203b1f44f143a351b518f7cda2 (diff)
parentf44d9efd3510776216938fef84adc99cc0e12412 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: fix APIC related bootup crash on Athlon XP CPUs time: add ADJ_OFFSET_SS_READ x86: export the symbol empty_zero_page on the 32-bit x86 architecture x86: fix kprobes_64.c inlining borkage pci: use pci=bfsort for HP DL385 G2, DL585 G2 x86: correctly set UTS_MACHINE for "make ARCH=x86" lockdep: annotate do_debug() trap handler x86: turn off iommu merge by default x86: fix ACPI compile for LOCAL_APIC=n x86: printk kernel version in WARN_ON and other dump_stack users ACPI: Set max_cstate to 1 for early Opterons. x86: fix NMI watchdog & 'stopped time' problem
-rw-r--r--arch/x86/kernel/apic_32.c2
-rw-r--r--arch/x86/kernel/i386_ksyms_32.c2
-rw-r--r--arch/x86/kernel/io_apic_32.c12
-rw-r--r--arch/x86/kernel/kprobes_64.c2
-rw-r--r--arch/x86/kernel/nmi_32.c9
-rw-r--r--arch/x86/kernel/pci-dma_64.c2
-rw-r--r--arch/x86/kernel/traps_32.c7
-rw-r--r--arch/x86/kernel/traps_64.c9
-rw-r--r--arch/x86/pci/common.c16
-rw-r--r--drivers/acpi/processor_idle.c1
-rw-r--r--include/asm-ia64/acpi.h1
-rw-r--r--include/asm-x86/acpi.h27
-rw-r--r--include/asm-x86/apic_32.h1
-rw-r--r--include/linux/timex.h1
-rw-r--r--kernel/time/ntp.c9
15 files changed, 91 insertions, 10 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 08b07c176962..96986b46bc85 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -789,7 +789,7 @@ void __init sync_Arb_IDs(void)
789 * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not 789 * Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 And not
790 * needed on AMD. 790 * needed on AMD.
791 */ 791 */
792 if (modern_apic()) 792 if (modern_apic() || boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
793 return; 793 return;
794 /* 794 /*
795 * Wait for idle. 795 * Wait for idle.
diff --git a/arch/x86/kernel/i386_ksyms_32.c b/arch/x86/kernel/i386_ksyms_32.c
index edd39ccf139e..02112fcc0de7 100644
--- a/arch/x86/kernel/i386_ksyms_32.c
+++ b/arch/x86/kernel/i386_ksyms_32.c
@@ -2,6 +2,7 @@
2#include <asm/semaphore.h> 2#include <asm/semaphore.h>
3#include <asm/checksum.h> 3#include <asm/checksum.h>
4#include <asm/desc.h> 4#include <asm/desc.h>
5#include <asm/pgtable.h>
5 6
6EXPORT_SYMBOL(__down_failed); 7EXPORT_SYMBOL(__down_failed);
7EXPORT_SYMBOL(__down_failed_interruptible); 8EXPORT_SYMBOL(__down_failed_interruptible);
@@ -29,3 +30,4 @@ EXPORT_SYMBOL(__read_lock_failed);
29#endif 30#endif
30 31
31EXPORT_SYMBOL(csum_partial); 32EXPORT_SYMBOL(csum_partial);
33EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c
index 6bb80ea5f4ee..6cf27319a91c 100644
--- a/arch/x86/kernel/io_apic_32.c
+++ b/arch/x86/kernel/io_apic_32.c
@@ -2166,6 +2166,10 @@ static inline void __init check_timer(void)
2166{ 2166{
2167 int apic1, pin1, apic2, pin2; 2167 int apic1, pin1, apic2, pin2;
2168 int vector; 2168 int vector;
2169 unsigned int ver;
2170
2171 ver = apic_read(APIC_LVR);
2172 ver = GET_APIC_VERSION(ver);
2169 2173
2170 /* 2174 /*
2171 * get/set the timer IRQ vector: 2175 * get/set the timer IRQ vector:
@@ -2179,11 +2183,15 @@ static inline void __init check_timer(void)
2179 * mode for the 8259A whenever interrupts are routed 2183 * mode for the 8259A whenever interrupts are routed
2180 * through I/O APICs. Also IRQ0 has to be enabled in 2184 * through I/O APICs. Also IRQ0 has to be enabled in
2181 * the 8259A which implies the virtual wire has to be 2185 * the 8259A which implies the virtual wire has to be
2182 * disabled in the local APIC. 2186 * disabled in the local APIC. Finally timer interrupts
2187 * need to be acknowledged manually in the 8259A for
2188 * timer_interrupt() and for the i82489DX when using
2189 * the NMI watchdog.
2183 */ 2190 */
2184 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 2191 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
2185 init_8259A(1); 2192 init_8259A(1);
2186 timer_ack = 1; 2193 timer_ack = !cpu_has_tsc;
2194 timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver));
2187 if (timer_over_8254 > 0) 2195 if (timer_over_8254 > 0)
2188 enable_8259A_irq(0); 2196 enable_8259A_irq(0);
2189 2197
diff --git a/arch/x86/kernel/kprobes_64.c b/arch/x86/kernel/kprobes_64.c
index 3db3611933d8..0c467644589c 100644
--- a/arch/x86/kernel/kprobes_64.c
+++ b/arch/x86/kernel/kprobes_64.c
@@ -58,7 +58,7 @@ const int kretprobe_blacklist_size = ARRAY_SIZE(kretprobe_blacklist);
58/* 58/*
59 * returns non-zero if opcode modifies the interrupt flag. 59 * returns non-zero if opcode modifies the interrupt flag.
60 */ 60 */
61static __always_inline int is_IF_modifier(kprobe_opcode_t *insn) 61static int __kprobes is_IF_modifier(kprobe_opcode_t *insn)
62{ 62{
63 switch (*insn) { 63 switch (*insn) {
64 case 0xfa: /* cli */ 64 case 0xfa: /* cli */
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c
index 600fd404e440..f5cc47c60b13 100644
--- a/arch/x86/kernel/nmi_32.c
+++ b/arch/x86/kernel/nmi_32.c
@@ -25,6 +25,7 @@
25 25
26#include <asm/smp.h> 26#include <asm/smp.h>
27#include <asm/nmi.h> 27#include <asm/nmi.h>
28#include <asm/timer.h>
28 29
29#include "mach_traps.h" 30#include "mach_traps.h"
30 31
@@ -83,7 +84,7 @@ static int __init check_nmi_watchdog(void)
83 84
84 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); 85 prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL);
85 if (!prev_nmi_count) 86 if (!prev_nmi_count)
86 return -1; 87 goto error;
87 88
88 printk(KERN_INFO "Testing NMI watchdog ... "); 89 printk(KERN_INFO "Testing NMI watchdog ... ");
89 90
@@ -117,7 +118,7 @@ static int __init check_nmi_watchdog(void)
117 if (!atomic_read(&nmi_active)) { 118 if (!atomic_read(&nmi_active)) {
118 kfree(prev_nmi_count); 119 kfree(prev_nmi_count);
119 atomic_set(&nmi_active, -1); 120 atomic_set(&nmi_active, -1);
120 return -1; 121 goto error;
121 } 122 }
122 printk("OK.\n"); 123 printk("OK.\n");
123 124
@@ -128,6 +129,10 @@ static int __init check_nmi_watchdog(void)
128 129
129 kfree(prev_nmi_count); 130 kfree(prev_nmi_count);
130 return 0; 131 return 0;
132error:
133 timer_ack = !cpu_has_tsc;
134
135 return -1;
131} 136}
132/* This needs to happen later in boot so counters are working */ 137/* This needs to happen later in boot so counters are working */
133late_initcall(check_nmi_watchdog); 138late_initcall(check_nmi_watchdog);
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index aa805b11b24f..5552d23d23c2 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -12,7 +12,7 @@
12#include <asm/gart.h> 12#include <asm/gart.h>
13#include <asm/calgary.h> 13#include <asm/calgary.h>
14 14
15int iommu_merge __read_mostly = 1; 15int iommu_merge __read_mostly = 0;
16EXPORT_SYMBOL(iommu_merge); 16EXPORT_SYMBOL(iommu_merge);
17 17
18dma_addr_t bad_dma_address __read_mostly; 18dma_addr_t bad_dma_address __read_mostly;
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index 298d13ed3ab3..ef6010262597 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -283,6 +283,11 @@ void dump_stack(void)
283{ 283{
284 unsigned long stack; 284 unsigned long stack;
285 285
286 printk("Pid: %d, comm: %.20s %s %s %.*s\n",
287 current->pid, current->comm, print_tainted(),
288 init_utsname()->release,
289 (int)strcspn(init_utsname()->version, " "),
290 init_utsname()->version);
286 show_trace(current, NULL, &stack); 291 show_trace(current, NULL, &stack);
287} 292}
288 293
@@ -828,6 +833,8 @@ fastcall void __kprobes do_debug(struct pt_regs * regs, long error_code)
828 unsigned int condition; 833 unsigned int condition;
829 struct task_struct *tsk = current; 834 struct task_struct *tsk = current;
830 835
836 trace_hardirqs_fixup();
837
831 get_debugreg(condition, 6); 838 get_debugreg(condition, 6);
832 839
833 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, 840 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 4a6bd4965f56..d11525ad81b4 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -31,6 +31,7 @@
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32#include <linux/bug.h> 32#include <linux/bug.h>
33#include <linux/kdebug.h> 33#include <linux/kdebug.h>
34#include <linux/utsname.h>
34 35
35#if defined(CONFIG_EDAC) 36#if defined(CONFIG_EDAC)
36#include <linux/edac.h> 37#include <linux/edac.h>
@@ -400,6 +401,12 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp)
400void dump_stack(void) 401void dump_stack(void)
401{ 402{
402 unsigned long dummy; 403 unsigned long dummy;
404
405 printk("Pid: %d, comm: %.20s %s %s %.*s\n",
406 current->pid, current->comm, print_tainted(),
407 init_utsname()->release,
408 (int)strcspn(init_utsname()->version, " "),
409 init_utsname()->version);
403 show_trace(NULL, NULL, &dummy); 410 show_trace(NULL, NULL, &dummy);
404} 411}
405 412
@@ -846,6 +853,8 @@ asmlinkage void __kprobes do_debug(struct pt_regs * regs,
846 struct task_struct *tsk = current; 853 struct task_struct *tsk = current;
847 siginfo_t info; 854 siginfo_t info;
848 855
856 trace_hardirqs_fixup();
857
849 get_debugreg(condition, 6); 858 get_debugreg(condition, 6);
850 859
851 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code, 860 if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index f4386990b150..862746390666 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -315,6 +315,22 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
315 }, 315 },
316 }, 316 },
317#endif 317#endif
318 {
319 .callback = set_bf_sort,
320 .ident = "HP ProLiant DL385 G2",
321 .matches = {
322 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
323 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL385 G2"),
324 },
325 },
326 {
327 .callback = set_bf_sort,
328 .ident = "HP ProLiant DL585 G2",
329 .matches = {
330 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
331 DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant DL585 G2"),
332 },
333 },
318 {} 334 {}
319}; 335};
320 336
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 7b6c20eeeaff..b1fbee3f7fe1 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1673,6 +1673,7 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
1673 1673
1674 if (!first_run) { 1674 if (!first_run) {
1675 dmi_check_system(processor_power_dmi_table); 1675 dmi_check_system(processor_power_dmi_table);
1676 max_cstate = acpi_processor_cstate_check(max_cstate);
1676 if (max_cstate < ACPI_C_STATES_MAX) 1677 if (max_cstate < ACPI_C_STATES_MAX)
1677 printk(KERN_NOTICE 1678 printk(KERN_NOTICE
1678 "ACPI: processor limited to max C-state %d\n", 1679 "ACPI: processor limited to max C-state %d\n",
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
index 49730ffbbae4..81bcd5e51789 100644
--- a/include/asm-ia64/acpi.h
+++ b/include/asm-ia64/acpi.h
@@ -94,6 +94,7 @@ ia64_acpi_release_global_lock (unsigned int *lock)
94#define acpi_noirq 0 /* ACPI always enabled on IA64 */ 94#define acpi_noirq 0 /* ACPI always enabled on IA64 */
95#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ 95#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */
96#define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ 96#define acpi_strict 1 /* no ACPI spec workarounds on IA64 */
97#define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */
97static inline void disable_acpi(void) { } 98static inline void disable_acpi(void) { }
98 99
99const char *acpi_get_sysname (void); 100const char *acpi_get_sysname (void);
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h
index 0693689d4146..f8a89793ac8c 100644
--- a/include/asm-x86/acpi.h
+++ b/include/asm-x86/acpi.h
@@ -1,5 +1,32 @@
1#ifndef _ASM_X86_ACPI_H
2#define _ASM_X86_ACPI_H
3
1#ifdef CONFIG_X86_32 4#ifdef CONFIG_X86_32
2# include "acpi_32.h" 5# include "acpi_32.h"
3#else 6#else
4# include "acpi_64.h" 7# include "acpi_64.h"
5#endif 8#endif
9
10#include <asm/processor.h>
11
12/*
13 * Check if the CPU can handle C2 and deeper
14 */
15static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
16{
17 /*
18 * Early models (<=5) of AMD Opterons are not supposed to go into
19 * C2 state.
20 *
21 * Steppings 0x0A and later are good
22 */
23 if (boot_cpu_data.x86 == 0x0F &&
24 boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
25 boot_cpu_data.x86_model <= 0x05 &&
26 boot_cpu_data.x86_mask < 0x0A)
27 return 1;
28 else
29 return max_cstate;
30}
31
32#endif
diff --git a/include/asm-x86/apic_32.h b/include/asm-x86/apic_32.h
index 4091b33dcb10..be158b27d54b 100644
--- a/include/asm-x86/apic_32.h
+++ b/include/asm-x86/apic_32.h
@@ -120,6 +120,7 @@ extern int local_apic_timer_disabled;
120 120
121#else /* !CONFIG_X86_LOCAL_APIC */ 121#else /* !CONFIG_X86_LOCAL_APIC */
122static inline void lapic_shutdown(void) { } 122static inline void lapic_shutdown(void) { }
123#define local_apic_timer_c2_ok 1
123 124
124#endif /* !CONFIG_X86_LOCAL_APIC */ 125#endif /* !CONFIG_X86_LOCAL_APIC */
125 126
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 37ac3ff90faf..24c6a2b59511 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -137,6 +137,7 @@ struct timex {
137#define ADJ_TIMECONST 0x0020 /* pll time constant */ 137#define ADJ_TIMECONST 0x0020 /* pll time constant */
138#define ADJ_TICK 0x4000 /* tick value */ 138#define ADJ_TICK 0x4000 /* tick value */
139#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ 139#define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */
140#define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */
140 141
141/* xntp 3.4 compatibility names */ 142/* xntp 3.4 compatibility names */
142#define MOD_OFFSET ADJ_OFFSET 143#define MOD_OFFSET ADJ_OFFSET
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 14a2ecf2b318..e64efaf957e8 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -249,10 +249,12 @@ int do_adjtimex(struct timex *txc)
249 249
250 /* Now we validate the data before disabling interrupts */ 250 /* Now we validate the data before disabling interrupts */
251 251
252 if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) 252 if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) {
253 /* singleshot must not be used with any other mode bits */ 253 /* singleshot must not be used with any other mode bits */
254 if (txc->modes != ADJ_OFFSET_SINGLESHOT) 254 if (txc->modes != ADJ_OFFSET_SINGLESHOT &&
255 txc->modes != ADJ_OFFSET_SS_READ)
255 return -EINVAL; 256 return -EINVAL;
257 }
256 258
257 if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET)) 259 if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET))
258 /* adjustment Offset limited to +- .512 seconds */ 260 /* adjustment Offset limited to +- .512 seconds */
@@ -372,7 +374,8 @@ int do_adjtimex(struct timex *txc)
372leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0) 374leave: if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0)
373 result = TIME_ERROR; 375 result = TIME_ERROR;
374 376
375 if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) 377 if ((txc->modes == ADJ_OFFSET_SINGLESHOT) ||
378 (txc->modes == ADJ_OFFSET_SS_READ))
376 txc->offset = save_adjust; 379 txc->offset = save_adjust;
377 else 380 else
378 txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) * 381 txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) *