diff options
author | Punit Agrawal <punit.agrawal@arm.com> | 2014-11-18 12:41:22 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2014-11-20 17:33:43 +0100 |
commit | 9b79f52d1a702dd5b160f9d2ee0199c3122809bb (patch) | |
tree | 497967506563c89d76c9853408b7e271c7d400f5 /arch/arm64/include/asm/traps.h | |
parent | arm64: percpu: Implement this_cpu operations (diff) | |
download | linux-9b79f52d1a702dd5b160f9d2ee0199c3122809bb.tar.xz linux-9b79f52d1a702dd5b160f9d2ee0199c3122809bb.zip |
arm64: Add support for hooks to handle undefined instructions
Add support to register hooks for undefined instructions. The handlers
will be called when the undefined instruction and the processor state
(as contained in pstate) match criteria used at registration.
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/traps.h')
-rw-r--r-- | arch/arm64/include/asm/traps.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index 10ca8ff93cc2..232e4ba5d314 100644 --- a/arch/arm64/include/asm/traps.h +++ b/arch/arm64/include/asm/traps.h @@ -18,6 +18,22 @@ #ifndef __ASM_TRAP_H #define __ASM_TRAP_H +#include <linux/list.h> + +struct pt_regs; + +struct undef_hook { + struct list_head node; + u32 instr_mask; + u32 instr_val; + u64 pstate_mask; + u64 pstate_val; + int (*fn)(struct pt_regs *regs, u32 instr); +}; + +void register_undef_hook(struct undef_hook *hook); +void unregister_undef_hook(struct undef_hook *hook); + static inline int in_exception_text(unsigned long ptr) { extern char __exception_text_start[]; |