Lines Matching refs:esr
246 unsigned long esr = tsk->thread.fault_code; in arm64_show_signal() local
256 if (esr) in arm64_show_signal()
257 pr_cont("%s, ESR 0x%016lx, ", esr_get_class_string(esr), esr); in arm64_show_signal()
489 void do_undefinstr(struct pt_regs *regs, unsigned long esr) in do_undefinstr() argument
499 die("Oops - Undefined instruction", regs, esr); in do_undefinstr()
510 void do_el1_bti(struct pt_regs *regs, unsigned long esr) in do_el1_bti() argument
512 die("Oops - BTI", regs, esr); in do_el1_bti()
516 void do_el0_fpac(struct pt_regs *regs, unsigned long esr) in do_el0_fpac() argument
518 force_signal_inject(SIGILL, ILL_ILLOPN, regs->pc, esr); in do_el0_fpac()
521 void do_el1_fpac(struct pt_regs *regs, unsigned long esr) in do_el1_fpac() argument
527 die("Oops - FPAC", regs, esr); in do_el1_fpac()
546 static void user_cache_maint_handler(unsigned long esr, struct pt_regs *regs)
549 int rt = ESR_ELx_SYS64_ISS_RT(esr);
550 int crm = (esr & ESR_ELx_SYS64_ISS_CRM_MASK) >> ESR_ELx_SYS64_ISS_CRM_SHIFT;
586 static void ctr_read_handler(unsigned long esr, struct pt_regs *regs) in ctr_read_handler() argument
588 int rt = ESR_ELx_SYS64_ISS_RT(esr); in ctr_read_handler()
605 static void cntvct_read_handler(unsigned long esr, struct pt_regs *regs) in cntvct_read_handler() argument
607 int rt = ESR_ELx_SYS64_ISS_RT(esr); in cntvct_read_handler()
613 static void cntfrq_read_handler(unsigned long esr, struct pt_regs *regs) in cntfrq_read_handler() argument
615 int rt = ESR_ELx_SYS64_ISS_RT(esr); in cntfrq_read_handler()
621 static void mrs_handler(unsigned long esr, struct pt_regs *regs) in mrs_handler() argument
625 rt = ESR_ELx_SYS64_ISS_RT(esr); in mrs_handler()
626 sysreg = esr_sys64_to_sysreg(esr); in mrs_handler()
632 static void wfi_handler(unsigned long esr, struct pt_regs *regs) in wfi_handler() argument
640 void (*handler)(unsigned long esr, struct pt_regs *regs);
689 static bool cp15_cond_valid(unsigned long esr, struct pt_regs *regs) in cp15_cond_valid() argument
694 if (!(esr & ESR_ELx_CV)) { in cp15_cond_valid()
703 cond = (esr & ESR_ELx_COND_MASK) >> ESR_ELx_COND_SHIFT; in cp15_cond_valid()
709 static void compat_cntfrq_read_handler(unsigned long esr, struct pt_regs *regs) in compat_cntfrq_read_handler() argument
711 int reg = (esr & ESR_ELx_CP15_32_ISS_RT_MASK) >> ESR_ELx_CP15_32_ISS_RT_SHIFT; in compat_cntfrq_read_handler()
726 static void compat_cntvct_read_handler(unsigned long esr, struct pt_regs *regs) in compat_cntvct_read_handler() argument
728 int rt = (esr & ESR_ELx_CP15_64_ISS_RT_MASK) >> ESR_ELx_CP15_64_ISS_RT_SHIFT; in compat_cntvct_read_handler()
729 int rt2 = (esr & ESR_ELx_CP15_64_ISS_RT2_MASK) >> ESR_ELx_CP15_64_ISS_RT2_SHIFT; in compat_cntvct_read_handler()
751 void do_cp15instr(unsigned long esr, struct pt_regs *regs) in do_cp15instr() argument
755 if (!cp15_cond_valid(esr, regs)) { in do_cp15instr()
764 switch (ESR_ELx_EC(esr)) { in do_cp15instr()
772 do_undefinstr(regs, esr); in do_cp15instr()
777 if ((hook->esr_mask & esr) == hook->esr_val) { in do_cp15instr()
778 hook->handler(esr, regs); in do_cp15instr()
787 do_undefinstr(regs, esr); in do_cp15instr()
792 void do_sysinstr(unsigned long esr, struct pt_regs *regs) in do_sysinstr() argument
797 if ((hook->esr_mask & esr) == hook->esr_val) { in do_sysinstr()
798 hook->handler(esr, regs); in do_sysinstr()
807 do_undefinstr(regs, esr); in do_sysinstr()
857 const char *esr_get_class_string(unsigned long esr) in esr_get_class_string() argument
859 return esr_class_str[ESR_ELx_EC(esr)]; in esr_get_class_string()
866 void bad_el0_sync(struct pt_regs *regs, int reason, unsigned long esr) in bad_el0_sync() argument
871 current->thread.fault_code = esr; in bad_el0_sync()
882 void panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigned long far) in panic_bad_stack() argument
891 pr_emerg("ESR: 0x%016lx -- %s\n", esr, esr_get_class_string(esr)); in panic_bad_stack()
912 void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr) in arm64_serror_panic() argument
917 smp_processor_id(), esr, esr_get_class_string(esr)); in arm64_serror_panic()
927 bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned long esr) in arm64_is_fatal_ras_serror() argument
929 unsigned long aet = arm64_ras_serror_get_severity(esr); in arm64_is_fatal_ras_serror()
955 arm64_serror_panic(regs, esr); in arm64_is_fatal_ras_serror()
959 void do_serror(struct pt_regs *regs, unsigned long esr) in do_serror() argument
962 if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr)) in do_serror()
963 arm64_serror_panic(regs, esr); in do_serror()
980 static int bug_handler(struct pt_regs *regs, unsigned long esr) in bug_handler() argument
984 die("Oops - BUG", regs, esr); in bug_handler()
1006 static int cfi_handler(struct pt_regs *regs, unsigned long esr) in cfi_handler() argument
1011 target = pt_regs_read_reg(regs, FIELD_GET(CFI_BRK_IMM_TARGET, esr)); in cfi_handler()
1012 type = (u32)pt_regs_read_reg(regs, FIELD_GET(CFI_BRK_IMM_TYPE, esr)); in cfi_handler()
1037 static int reserved_fault_handler(struct pt_regs *regs, unsigned long esr) in reserved_fault_handler() argument
1057 #define KASAN_ESR_SIZE(esr) (1 << ((esr) & KASAN_ESR_SIZE_MASK)) argument
1059 static int kasan_handler(struct pt_regs *regs, unsigned long esr) in kasan_handler() argument
1061 bool recover = esr & KASAN_ESR_RECOVER; in kasan_handler()
1062 bool write = esr & KASAN_ESR_WRITE; in kasan_handler()
1063 size_t size = KASAN_ESR_SIZE(esr); in kasan_handler()
1084 die("Oops - KASAN", regs, esr); in kasan_handler()
1099 #define esr_comment(esr) ((esr) & ESR_ELx_BRK64_ISS_COMMENT_MASK) argument
1105 int __init early_brk64(unsigned long addr, unsigned long esr, in early_brk64() argument
1109 if ((esr_comment(esr) & ~CFI_BRK_IMM_MASK) == CFI_BRK_IMM_BASE) in early_brk64()
1110 return cfi_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1113 if ((esr_comment(esr) & ~KASAN_BRK_MASK) == KASAN_BRK_IMM) in early_brk64()
1114 return kasan_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1116 return bug_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()