diff options
Diffstat (limited to 'arch/x86/kernel/time_32.c')
-rw-r--r-- | arch/x86/kernel/time_32.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c index 2ff21f398934..77b400f06ea2 100644 --- a/arch/x86/kernel/time_32.c +++ b/arch/x86/kernel/time_32.c | |||
@@ -36,12 +36,10 @@ | |||
36 | #include <asm/arch_hooks.h> | 36 | #include <asm/arch_hooks.h> |
37 | #include <asm/hpet.h> | 37 | #include <asm/hpet.h> |
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/timer.h> | ||
39 | 40 | ||
40 | #include "do_timer.h" | 41 | #include "do_timer.h" |
41 | 42 | ||
42 | unsigned int cpu_khz; /* Detected as we calibrate the TSC */ | ||
43 | EXPORT_SYMBOL(cpu_khz); | ||
44 | |||
45 | int timer_ack; | 43 | int timer_ack; |
46 | 44 | ||
47 | unsigned long profile_pc(struct pt_regs *regs) | 45 | unsigned long profile_pc(struct pt_regs *regs) |
@@ -49,10 +47,9 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
49 | unsigned long pc = instruction_pointer(regs); | 47 | unsigned long pc = instruction_pointer(regs); |
50 | 48 | ||
51 | #ifdef CONFIG_SMP | 49 | #ifdef CONFIG_SMP |
52 | if (!v8086_mode(regs) && SEGMENT_IS_KERNEL_CODE(regs->cs) && | 50 | if (!user_mode_vm(regs) && in_lock_functions(pc)) { |
53 | in_lock_functions(pc)) { | ||
54 | #ifdef CONFIG_FRAME_POINTER | 51 | #ifdef CONFIG_FRAME_POINTER |
55 | return *(unsigned long *)(regs->bp + 4); | 52 | return *(unsigned long *)(regs->bp + sizeof(long)); |
56 | #else | 53 | #else |
57 | unsigned long *sp = (unsigned long *)®s->sp; | 54 | unsigned long *sp = (unsigned long *)®s->sp; |
58 | 55 | ||
@@ -84,8 +81,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
84 | if (timer_ack) { | 81 | if (timer_ack) { |
85 | /* | 82 | /* |
86 | * Subtle, when I/O APICs are used we have to ack timer IRQ | 83 | * Subtle, when I/O APICs are used we have to ack timer IRQ |
87 | * manually to reset the IRR bit for do_slow_gettimeoffset(). | 84 | * manually to deassert NMI lines for the watchdog if run |
88 | * This will also deassert NMI lines for the watchdog if run | ||
89 | * on an 82489DX-based system. | 85 | * on an 82489DX-based system. |
90 | */ | 86 | */ |
91 | spin_lock(&i8259A_lock); | 87 | spin_lock(&i8259A_lock); |
@@ -98,6 +94,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
98 | 94 | ||
99 | do_timer_interrupt_hook(); | 95 | do_timer_interrupt_hook(); |
100 | 96 | ||
97 | #ifdef CONFIG_MCA | ||
101 | if (MCA_bus) { | 98 | if (MCA_bus) { |
102 | /* The PS/2 uses level-triggered interrupts. You can't | 99 | /* The PS/2 uses level-triggered interrupts. You can't |
103 | turn them off, nor would you want to (any attempt to | 100 | turn them off, nor would you want to (any attempt to |
@@ -111,6 +108,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
111 | u8 irq_v = inb_p( 0x61 ); /* read the current state */ | 108 | u8 irq_v = inb_p( 0x61 ); /* read the current state */ |
112 | outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ | 109 | outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ |
113 | } | 110 | } |
111 | #endif | ||
114 | 112 | ||
115 | return IRQ_HANDLED; | 113 | return IRQ_HANDLED; |
116 | } | 114 | } |
@@ -133,6 +131,7 @@ void __init hpet_time_init(void) | |||
133 | */ | 131 | */ |
134 | void __init time_init(void) | 132 | void __init time_init(void) |
135 | { | 133 | { |
134 | pre_time_init_hook(); | ||
136 | tsc_init(); | 135 | tsc_init(); |
137 | late_time_init = choose_time_init(); | 136 | late_time_init = choose_time_init(); |
138 | } | 137 | } |