x86/time: Unconditionally register legacy timer interrupt
authorPeter Zijlstra <peterz@infradead.org>
Fri, 22 Dec 2017 09:20:12 +0000 (10:20 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 14 Jan 2018 19:18:23 +0000 (20:18 +0100)
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
arch/x86/kernel/time.c

index 749d189f8cd4675de3267310e38217a8082c0485..774ebafa97c4395d99b319fe41868f3e89eabc4e 100644 (file)
@@ -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 */