Skip to content

Commit

Permalink
x86/time: Unconditionally register legacy timer interrupt
Browse files Browse the repository at this point in the history
Even without a PIC/PIT the legacy timer interrupt is required for HPET in
legacy replacement mode.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: len.brown@intel.com
Cc: rui.zhang@intel.com
Link: https://lkml.kernel.org/r/20171222092243.382623763@infradead.org
  • Loading branch information
Peter Zijlstra authored and Thomas Gleixner committed Jan 14, 2018
1 parent 30c7e5b commit 6d671e1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/x86/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ static struct irqaction irq0 = {

static void __init setup_default_timer_irq(void)
{
if (!nr_legacy_irqs())
return;
setup_irq(0, &irq0);
/*
* Unconditionally register the legacy timer; even without legacy
* PIC/PIT we need this for the HPET0 in legacy replacement mode.
*/
if (setup_irq(0, &irq0))
pr_info("Failed to register legacy timer interrupt\n");
}

/* Default timer init function */
Expand Down

0 comments on commit 6d671e1

Please sign in to comment.