diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-09-27 18:15:29 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-10-01 14:35:53 +0200 |
commit | 70c63cdfd6ee615714c5453cff370032587723c2 (patch) | |
tree | ba5d980a83afa543fd7af5f7fbdce4ea8d05557a /arch/arm64/kernel/traps.c | |
parent | arm64: Add decoding macros for CP15_32 and CP15_64 traps (diff) | |
download | linux-70c63cdfd6ee615714c5453cff370032587723c2.tar.xz linux-70c63cdfd6ee615714c5453cff370032587723c2.zip |
arm64: compat: Add separate CP15 trapping hook
Instead of directly generating an UNDEF when trapping a CP15 access,
let's add a new entry point to that effect (which only generates an
UNDEF for now).
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r-- | arch/arm64/kernel/traps.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 21689c6a985f..0e2665936493 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -547,6 +547,19 @@ static struct sys64_hook sys64_hooks[] = { {}, }; + +#ifdef CONFIG_COMPAT +asmlinkage void __exception do_cp15instr(unsigned int esr, struct pt_regs *regs) +{ + /* + * New cp15 instructions may previously have been undefined at + * EL0. Fall back to our usual undefined instruction handler + * so that we handle these consistently. + */ + do_undefinstr(regs); +} +#endif + asmlinkage void __exception do_sysinstr(unsigned int esr, struct pt_regs *regs) { struct sys64_hook *hook; |