2019-06-03 13:44:50 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-05 19:49:34 +08:00
|
|
|
/*
|
|
|
|
* Based on arch/arm/include/asm/exception.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_EXCEPTION_H
|
|
|
|
#define __ASM_EXCEPTION_H
|
|
|
|
|
2018-01-16 03:38:59 +08:00
|
|
|
#include <asm/esr.h>
|
2019-10-26 00:42:10 +08:00
|
|
|
#include <asm/kprobes.h>
|
2019-10-26 00:42:11 +08:00
|
|
|
#include <asm/ptrace.h>
|
2018-01-16 03:38:59 +08:00
|
|
|
|
2016-03-26 05:22:05 +08:00
|
|
|
#include <linux/interrupt.h>
|
2015-08-12 22:16:19 +08:00
|
|
|
|
|
|
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
|
|
|
#define __exception_irq_entry __irq_entry
|
|
|
|
#else
|
2019-10-26 00:42:10 +08:00
|
|
|
#define __exception_irq_entry __kprobes
|
2015-08-12 22:16:19 +08:00
|
|
|
#endif
|
2012-03-05 19:49:34 +08:00
|
|
|
|
2018-01-16 03:38:59 +08:00
|
|
|
static inline u32 disr_to_esr(u64 disr)
|
|
|
|
{
|
|
|
|
unsigned int esr = ESR_ELx_EC_SERROR << ESR_ELx_EC_SHIFT;
|
|
|
|
|
|
|
|
if ((disr & DISR_EL1_IDS) == 0)
|
|
|
|
esr |= (disr & DISR_EL1_ESR_MASK);
|
|
|
|
else
|
|
|
|
esr |= (disr & ESR_ELx_ISS_MASK);
|
|
|
|
|
|
|
|
return esr;
|
|
|
|
}
|
|
|
|
|
2019-08-21 01:45:57 +08:00
|
|
|
asmlinkage void enter_from_user_mode(void);
|
2019-10-26 00:42:15 +08:00
|
|
|
void do_mem_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs);
|
|
|
|
void do_undefinstr(struct pt_regs *regs);
|
2020-03-17 00:50:45 +08:00
|
|
|
void do_bti(struct pt_regs *regs);
|
2019-10-26 00:42:11 +08:00
|
|
|
asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr);
|
2019-10-26 00:42:15 +08:00
|
|
|
void do_debug_exception(unsigned long addr_if_watchpoint, unsigned int esr,
|
|
|
|
struct pt_regs *regs);
|
|
|
|
void do_fpsimd_acc(unsigned int esr, struct pt_regs *regs);
|
|
|
|
void do_sve_acc(unsigned int esr, struct pt_regs *regs);
|
|
|
|
void do_fpsimd_exc(unsigned int esr, struct pt_regs *regs);
|
|
|
|
void do_sysinstr(unsigned int esr, struct pt_regs *regs);
|
|
|
|
void do_sp_pc_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs);
|
|
|
|
void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int esr);
|
|
|
|
void do_cp15instr(unsigned int esr, struct pt_regs *regs);
|
2020-01-17 02:35:47 +08:00
|
|
|
void do_el0_svc(struct pt_regs *regs);
|
|
|
|
void do_el0_svc_compat(struct pt_regs *regs);
|
2012-03-05 19:49:34 +08:00
|
|
|
#endif /* __ASM_EXCEPTION_H */
|