Skip to content

Commit

Permalink
sh64: Provide EXPEVT helper.
Browse files Browse the repository at this point in the history
We need a lookup_exception_vector() helper for sh64 in order to use the
common page fault code.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed May 14, 2012
1 parent dbdb4e9 commit f007688
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/sh/include/asm/traps_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@
#ifndef __ASM_SH_TRAPS_64_H
#define __ASM_SH_TRAPS_64_H

#include <cpu/registers.h>

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();
Expand Down

0 comments on commit f007688

Please sign in to comment.