From: Paul Mundt Date: Mon, 14 May 2012 04:04:08 +0000 (+0900) Subject: sh64: Provide EXPEVT helper. X-Git-Tag: v3.5-rc1~134^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f007688a50cf5724049a4a5f17023fcdb0966b54;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git sh64: Provide EXPEVT helper. We need a lookup_exception_vector() helper for sh64 in order to use the common page fault code. Signed-off-by: Paul Mundt --- diff --git a/arch/sh/include/asm/traps_64.h b/arch/sh/include/asm/traps_64.h index c52d7f9..ef5eff9 100644 --- a/arch/sh/include/asm/traps_64.h +++ b/arch/sh/include/asm/traps_64.h @@ -10,8 +10,22 @@ #ifndef __ASM_SH_TRAPS_64_H #define __ASM_SH_TRAPS_64_H +#include + extern void phys_stext(void); +#define lookup_exception_vector() \ +({ \ + unsigned long _vec; \ + \ + __asm__ __volatile__ ( \ + "getcon " __EXPEVT ", %0\n\t" \ + : "=r" (_vec) \ + ); \ + \ + _vec; \ +}) + static inline void trigger_address_error(void) { phys_stext();