x86: hardirq: use inc_irq_stat() in non-unified functions
[safe/jmp/linux-2.6] / arch / x86 / kernel / time_32.c
index 059ca6e..65309e4 100644 (file)
@@ -36,6 +36,7 @@
 #include <asm/arch_hooks.h>
 #include <asm/hpet.h>
 #include <asm/time.h>
+#include <asm/timer.h>
 
 #include "do_timer.h"
 
@@ -46,10 +47,9 @@ unsigned long profile_pc(struct pt_regs *regs)
        unsigned long pc = instruction_pointer(regs);
 
 #ifdef CONFIG_SMP
-       if (!v8086_mode(regs) && SEGMENT_IS_KERNEL_CODE(regs->cs) &&
-           in_lock_functions(pc)) {
+       if (!user_mode_vm(regs) && in_lock_functions(pc)) {
 #ifdef CONFIG_FRAME_POINTER
-               return *(unsigned long *)(regs->bp + 4);
+               return *(unsigned long *)(regs->bp + sizeof(long));
 #else
                unsigned long *sp = (unsigned long *)&regs->sp;
 
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(profile_pc);
 irqreturn_t timer_interrupt(int irq, void *dev_id)
 {
        /* Keep nmi watchdog up to date */
-       per_cpu(irq_stat, smp_processor_id()).irq0_irqs++;
+       inc_irq_stat(irq0_irqs);
 
 #ifdef CONFIG_X86_IO_APIC
        if (timer_ack) {
@@ -94,6 +94,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
 
        do_timer_interrupt_hook();
 
+#ifdef CONFIG_MCA
        if (MCA_bus) {
                /* The PS/2 uses level-triggered interrupts.  You can't
                turn them off, nor would you want to (any attempt to
@@ -107,6 +108,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
                u8 irq_v = inb_p( 0x61 );       /* read the current state */
                outb_p( irq_v|0x80, 0x61 );     /* reset the IRQ */
        }
+#endif
 
        return IRQ_HANDLED;
 }
@@ -129,6 +131,7 @@ void __init hpet_time_init(void)
  */
 void __init time_init(void)
 {
+       pre_time_init_hook();
        tsc_init();
        late_time_init = choose_time_init();
 }