threshold.c 934 字节
Newer Older
1 2 3
/*
 * Common corrected MCE threshold handler code:
 */
4
#include <linux/interrupt.h>
5 6
#include <linux/kernel.h>

7
#include <asm/irq_vectors.h>
8
#include <asm/apic.h>
9
#include <asm/idle.h>
10
#include <asm/mce.h>
11
#include <asm/trace/irq_vectors.h>
12 13 14 15 16 17 18 19 20

static void default_threshold_interrupt(void)
{
	printk(KERN_ERR "Unexpected threshold interrupt at vector %x\n",
			 THRESHOLD_APIC_VECTOR);
}

void (*mce_threshold_vector)(void) = default_threshold_interrupt;

21
static inline void __smp_threshold_interrupt(void)
22 23 24
{
	inc_irq_stat(irq_threshold_count);
	mce_threshold_vector();
25 26
}

27
asmlinkage __visible void smp_threshold_interrupt(void)
28 29 30 31
{
	entering_irq();
	__smp_threshold_interrupt();
	exiting_ack_irq();
32
}
33

34
asmlinkage __visible void smp_trace_threshold_interrupt(void)
35 36 37 38 39 40 41
{
	entering_irq();
	trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
	__smp_threshold_interrupt();
	trace_threshold_apic_exit(THRESHOLD_APIC_VECTOR);
	exiting_ack_irq();
}