diff options
Diffstat (limited to 'arch/x86/kernel/time_32.c')
-rw-r--r-- | arch/x86/kernel/time_32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c index ffe3c664afc..77b400f06ea 100644 --- a/arch/x86/kernel/time_32.c +++ b/arch/x86/kernel/time_32.c | |||
@@ -36,6 +36,7 @@ | |||
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 | ||
@@ -46,10 +47,9 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
46 | unsigned long pc = instruction_pointer(regs); | 47 | unsigned long pc = instruction_pointer(regs); |
47 | 48 | ||
48 | #ifdef CONFIG_SMP | 49 | #ifdef CONFIG_SMP |
49 | if (!v8086_mode(regs) && SEGMENT_IS_KERNEL_CODE(regs->cs) && | 50 | if (!user_mode_vm(regs) && in_lock_functions(pc)) { |
50 | in_lock_functions(pc)) { | ||
51 | #ifdef CONFIG_FRAME_POINTER | 51 | #ifdef CONFIG_FRAME_POINTER |
52 | return *(unsigned long *)(regs->bp + 4); | 52 | return *(unsigned long *)(regs->bp + sizeof(long)); |
53 | #else | 53 | #else |
54 | unsigned long *sp = (unsigned long *)®s->sp; | 54 | unsigned long *sp = (unsigned long *)®s->sp; |
55 | 55 | ||
@@ -94,6 +94,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
94 | 94 | ||
95 | do_timer_interrupt_hook(); | 95 | do_timer_interrupt_hook(); |
96 | 96 | ||
97 | #ifdef CONFIG_MCA | ||
97 | if (MCA_bus) { | 98 | if (MCA_bus) { |
98 | /* The PS/2 uses level-triggered interrupts. You can't | 99 | /* The PS/2 uses level-triggered interrupts. You can't |
99 | turn them off, nor would you want to (any attempt to | 100 | turn them off, nor would you want to (any attempt to |
@@ -107,6 +108,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
107 | u8 irq_v = inb_p( 0x61 ); /* read the current state */ | 108 | u8 irq_v = inb_p( 0x61 ); /* read the current state */ |
108 | outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ | 109 | outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ |
109 | } | 110 | } |
111 | #endif | ||
110 | 112 | ||
111 | return IRQ_HANDLED; | 113 | return IRQ_HANDLED; |
112 | } | 114 | } |