Skip to content

Commit

Permalink
x86: wrap MCA_bus test around an ifdef
Browse files Browse the repository at this point in the history
Only test for MCA_bus if support for MCA is compiled in.
Also, for x86_64, write the code inside the conditional
for consistency with i386. It won't bite us, since it'll
probably never select CONFIG_MCA anyway.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Oct 13, 2008
1 parent 2c460d0 commit 33c053d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down
8 changes: 8 additions & 0 deletions arch/x86/kernel/time_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/time.h>
#include <linux/mca.h>

#include <asm/i8253.h>
#include <asm/hpet.h>
Expand Down Expand Up @@ -54,6 +55,13 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)

global_clock_event->event_handler(global_clock_event);

#ifdef CONFIG_MCA
if (MCA_bus) {
u8 irq_v = inb_p(0x61); /* read the current state */
outb_p(irq_v|0x80, 0x61); /* reset the IRQ */
}
#endif

return IRQ_HANDLED;
}

Expand Down

0 comments on commit 33c053d

Please sign in to comment.