Skip to content

Commit 6d671e1

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
x86/time: Unconditionally register legacy timer interrupt
Even without a PIC/PIT the legacy timer interrupt is required for HPET in legacy replacement mode. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent 30c7e5b commit 6d671e1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

arch/x86/kernel/time.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@ static struct irqaction irq0 = {
6969

7070
static void __init setup_default_timer_irq(void)
7171
{
72-
if (!nr_legacy_irqs())
73-
return;
74-
setup_irq(0, &irq0);
72+
/*
73+
* Unconditionally register the legacy timer; even without legacy
74+
* PIC/PIT we need this for the HPET0 in legacy replacement mode.
75+
*/
76+
if (setup_irq(0, &irq0))
77+
pr_info("Failed to register legacy timer interrupt\n");
7578
}
7679

7780
/* Default timer init function */

0 commit comments

Comments
 (0)