| 
									
										
										
										
											2007-07-19 01:49:12 -07:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * irq.c | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * (C) Copyright 2007, Greg Ungerer <gerg@snapgear.com> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is subject to the terms and conditions of the GNU General Public | 
					
						
							|  |  |  |  * License.  See the file COPYING in the main directory of this archive | 
					
						
							|  |  |  |  * for more details. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <linux/types.h>
 | 
					
						
							|  |  |  | #include <linux/init.h>
 | 
					
						
							|  |  |  | #include <linux/kernel.h>
 | 
					
						
							|  |  |  | #include <linux/kernel_stat.h>
 | 
					
						
							|  |  |  | #include <linux/interrupt.h>
 | 
					
						
							|  |  |  | #include <linux/irq.h>
 | 
					
						
							|  |  |  | #include <linux/seq_file.h>
 | 
					
						
							|  |  |  | #include <asm/traps.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | asmlinkage void do_IRQ(int irq, struct pt_regs *regs) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	struct pt_regs *oldregs = set_irq_regs(regs); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	irq_enter(); | 
					
						
							| 
									
										
										
										
											2009-03-20 09:53:59 +10:00
										 |  |  | 	generic_handle_irq(irq); | 
					
						
							| 
									
										
										
										
											2007-07-19 01:49:12 -07:00
										 |  |  | 	irq_exit(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	set_irq_regs(oldregs); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2011-07-13 20:29:24 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* The number of spurious interrupts */ | 
					
						
							|  |  |  | atomic_t irq_err_count; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | int arch_show_interrupts(struct seq_file *p, int prec) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); | 
					
						
							|  |  |  | 	return 0; | 
					
						
							|  |  |  | } |