Merge tag 'x86-entry-2021-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / arch / x86 / kernel / irq.c
index 1507b98..58aa712 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/hw_irq.h>
 #include <asm/desc.h>
 #include <asm/traps.h>
+#include <asm/thermal.h>
 
 #define CREATE_TRACE_POINTS
 #include <asm/trace/irq_vectors.h>
@@ -374,3 +375,23 @@ void fixup_irqs(void)
        }
 }
 #endif
+
+#ifdef CONFIG_X86_THERMAL_VECTOR
+static void smp_thermal_vector(void)
+{
+       if (x86_thermal_enabled())
+               intel_thermal_interrupt();
+       else
+               pr_err("CPU%d: Unexpected LVT thermal interrupt!\n",
+                      smp_processor_id());
+}
+
+DEFINE_IDTENTRY_SYSVEC(sysvec_thermal)
+{
+       trace_thermal_apic_entry(THERMAL_APIC_VECTOR);
+       inc_irq_stat(irq_thermal_count);
+       smp_thermal_vector();
+       trace_thermal_apic_exit(THERMAL_APIC_VECTOR);
+       ack_APIC_irq();
+}
+#endif