-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86, mce, cmci: factor out threshold interrupt handler
Impact: cleanup; preparation for feature The mce_amd_64 code has an own private MC threshold vector with an own interrupt handler. Since Intel needs a similar handler it makes sense to share the vector because both can not be active at the same time. I factored the common APIC handler code into a separate file which can be used by both the Intel or AMD MC code. This is needed for the next patch which adds an Intel specific CMCI handler. This patch should be a nop for AMD, it just moves some code around. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
- Loading branch information
Andi Kleen
authored and
H. Peter Anvin
committed
Feb 24, 2009
1 parent
41fdff3
commit b276268
Showing
5 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* Common corrected MCE threshold handler code */ | ||
#include <linux/kernel.h> | ||
#include <linux/interrupt.h> | ||
#include <asm/mce.h> | ||
#include <asm/irq_vectors.h> | ||
#include <asm/idle.h> | ||
|
||
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; | ||
|
||
asmlinkage void mce_threshold_interrupt(void) | ||
{ | ||
ack_APIC_irq(); | ||
exit_idle(); | ||
irq_enter(); | ||
inc_irq_stat(irq_threshold_count); | ||
mce_threshold_vector(); | ||
irq_exit(); | ||
} |