threshold.c 947 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Common corrected MCE threshold handler code:
  3. */
  4. #include <linux/interrupt.h>
  5. #include <linux/kernel.h>
  6. #include <asm/irq_vectors.h>
  7. #include <asm/apic.h>
  8. #include <asm/idle.h>
  9. #include <asm/mce.h>
  10. #include <asm/trace/irq_vectors.h>
  11. static void default_threshold_interrupt(void)
  12. {
  13. pr_err("Unexpected threshold interrupt at vector %x\n",
  14. THRESHOLD_APIC_VECTOR);
  15. }
  16. void (*mce_threshold_vector)(void) = default_threshold_interrupt;
  17. static inline void __smp_threshold_interrupt(void)
  18. {
  19. inc_irq_stat(irq_threshold_count);
  20. mce_threshold_vector();
  21. }
  22. asmlinkage __visible void __irq_entry smp_threshold_interrupt(void)
  23. {
  24. entering_irq();
  25. __smp_threshold_interrupt();
  26. exiting_ack_irq();
  27. }
  28. asmlinkage __visible void __irq_entry smp_trace_threshold_interrupt(void)
  29. {
  30. entering_irq();
  31. trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
  32. __smp_threshold_interrupt();
  33. trace_threshold_apic_exit(THRESHOLD_APIC_VECTOR);
  34. exiting_ack_irq();
  35. }