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>
此提交包含在:
Marc Zyngier
2018-09-27 17:15:29 +01:00
提交者 Catalin Marinas
父節點 bd7ac140b8
當前提交 70c63cdfd6
共有 2 個檔案被更改,包括 26 行新增2 行删除

查看文件

@@ -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;