diff options
author | Tony Lindgren | 2017-03-06 17:37:53 +0100 |
---|---|---|
committer | Tony Lindgren | 2017-03-06 17:37:53 +0100 |
commit | e24bce8fb4c26bd0d8eca74cbbee1ad049246be3 (patch) | |
tree | c219c2ec183633aa15841fca5b055a09d2d0b980 /arch/arm64/kernel/traps.c | |
parent | ARM: OMAP2+: Release device node after it is no longer needed. (diff) | |
parent | Linux 4.11-rc1 (diff) | |
download | kernel-qcow2-linux-e24bce8fb4c26bd0d8eca74cbbee1ad049246be3.tar.gz kernel-qcow2-linux-e24bce8fb4c26bd0d8eca74cbbee1ad049246be3.tar.xz kernel-qcow2-linux-e24bce8fb4c26bd0d8eca74cbbee1ad049246be3.zip |
Merge tag 'v4.11-rc1' into omap-for-v4.11/fixes
Linux 4.11-rc1
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r-- | arch/arm64/kernel/traps.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index 659b2e6b6cf7..e52be6aa44ee 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -29,8 +29,11 @@ #include <linux/kexec.h> #include <linux/delay.h> #include <linux/init.h> -#include <linux/sched.h> +#include <linux/sched/signal.h> +#include <linux/sched/debug.h> +#include <linux/sched/task_stack.h> #include <linux/syscalls.h> +#include <linux/mm_types.h> #include <asm/atomic.h> #include <asm/bug.h> @@ -466,7 +469,7 @@ static void user_cache_maint_handler(unsigned int esr, struct pt_regs *regs) int crm = (esr & ESR_ELx_SYS64_ISS_CRM_MASK) >> ESR_ELx_SYS64_ISS_CRM_SHIFT; int ret = 0; - address = (rt == 31) ? 0 : regs->regs[rt]; + address = pt_regs_read_reg(regs, rt); switch (crm) { case ESR_ELx_SYS64_ISS_CRM_DC_CVAU: /* DC CVAU, gets promoted */ @@ -495,8 +498,10 @@ static void user_cache_maint_handler(unsigned int esr, struct pt_regs *regs) static void ctr_read_handler(unsigned int esr, struct pt_regs *regs) { int rt = (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT; + unsigned long val = arm64_ftr_reg_user_value(&arm64_ftr_reg_ctrel0); + + pt_regs_write_reg(regs, rt, val); - regs->regs[rt] = arm64_ftr_reg_ctrel0.sys_val; regs->pc += 4; } @@ -531,7 +536,12 @@ asmlinkage void __exception do_sysinstr(unsigned int esr, struct pt_regs *regs) return; } - force_signal_inject(SIGILL, ILL_ILLOPC, regs, 0); + /* + * New SYS 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); } long compat_arm_syscall(struct pt_regs *regs); |