| 
									
										
										
										
											2012-03-28 18:30:03 +01:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (C) 2000, 2001  Paolo Alberelli | 
					
						
							|  |  |  |  * Copyright (C) 2003  Paul Mundt | 
					
						
							|  |  |  |  * Copyright (C) 2004  Richard Curnow | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * 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. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #ifndef __ASM_SH_TRAPS_64_H
 | 
					
						
							|  |  |  | #define __ASM_SH_TRAPS_64_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-14 13:04:08 +09:00
										 |  |  | #include <cpu/registers.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-28 18:30:03 +01:00
										 |  |  | extern void phys_stext(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-14 13:04:08 +09:00
										 |  |  | #define lookup_exception_vector()		\
 | 
					
						
							|  |  |  | ({						\ | 
					
						
							|  |  |  | 	unsigned long _vec;			\ | 
					
						
							|  |  |  | 						\ | 
					
						
							|  |  |  | 	__asm__ __volatile__ (			\ | 
					
						
							|  |  |  | 		"getcon " __EXPEVT ", %0\n\t"	\ | 
					
						
							|  |  |  | 		: "=r" (_vec)			\ | 
					
						
							|  |  |  | 	);					\ | 
					
						
							|  |  |  | 						\ | 
					
						
							|  |  |  | 	_vec;					\ | 
					
						
							|  |  |  | }) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-28 18:30:03 +01:00
										 |  |  | static inline void trigger_address_error(void) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	phys_stext(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define BUILD_TRAP_HANDLER(name)	\
 | 
					
						
							|  |  |  | asmlinkage void name##_trap_handler(unsigned int vec, struct pt_regs *regs) | 
					
						
							|  |  |  | #define TRAP_HANDLER_DECL
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* __ASM_SH_TRAPS_64_H */
 |