Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f007688a authored by Paul Mundt's avatar Paul Mundt
Browse files

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent dbdb4e9f
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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();