| 
									
										
										
										
											2009-03-04 11:47:17 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Common corrected MCE threshold handler code: | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | #include <linux/interrupt.h>
 | 
					
						
							| 
									
										
										
										
											2009-03-04 11:47:17 +01:00
										 |  |  | #include <linux/kernel.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | #include <asm/irq_vectors.h>
 | 
					
						
							| 
									
										
										
										
											2009-03-04 11:47:17 +01:00
										 |  |  | #include <asm/apic.h>
 | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | #include <asm/idle.h>
 | 
					
						
							| 
									
										
										
										
											2009-03-04 11:47:17 +01:00
										 |  |  | #include <asm/mce.h>
 | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 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; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-28 23:32:56 +02:00
										 |  |  | asmlinkage void smp_threshold_interrupt(void) | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | { | 
					
						
							|  |  |  | 	irq_enter(); | 
					
						
							| 
									
										
										
										
											2011-10-07 18:22:09 +02:00
										 |  |  | 	exit_idle(); | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | 	inc_irq_stat(irq_threshold_count); | 
					
						
							|  |  |  | 	mce_threshold_vector(); | 
					
						
							|  |  |  | 	irq_exit(); | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:32 +01:00
										 |  |  | 	/* Ack only at the end to avoid potential reentry */ | 
					
						
							|  |  |  | 	ack_APIC_irq(); | 
					
						
							| 
									
										
										
										
											2009-02-12 13:49:31 +01:00
										 |  |  | } |