Lines Matching refs:esr

247 	unsigned long esr = tsk->thread.fault_code;  in arm64_show_signal()  local
257 if (esr) in arm64_show_signal()
258 pr_cont("%s, ESR 0x%016lx, ", esr_get_class_string(esr), esr); in arm64_show_signal()
454 void do_el0_undef(struct pt_regs *regs, unsigned long esr) in do_el0_undef() argument
475 void do_el1_undef(struct pt_regs *regs, unsigned long esr) in do_el1_undef() argument
486 die("Oops - Undefined instruction", regs, esr); in do_el1_undef()
494 void do_el1_bti(struct pt_regs *regs, unsigned long esr) in do_el1_bti() argument
500 die("Oops - BTI", regs, esr); in do_el1_bti()
503 void do_el0_fpac(struct pt_regs *regs, unsigned long esr) in do_el0_fpac() argument
505 force_signal_inject(SIGILL, ILL_ILLOPN, regs->pc, esr); in do_el0_fpac()
508 void do_el1_fpac(struct pt_regs *regs, unsigned long esr) in do_el1_fpac() argument
514 die("Oops - FPAC", regs, esr); in do_el1_fpac()
517 void do_el0_mops(struct pt_regs *regs, unsigned long esr) in do_el0_mops() argument
519 bool wrong_option = esr & ESR_ELx_MOPS_ISS_WRONG_OPTION; in do_el0_mops()
520 bool option_a = esr & ESR_ELx_MOPS_ISS_OPTION_A; in do_el0_mops()
521 int dstreg = ESR_ELx_MOPS_ISS_DESTREG(esr); in do_el0_mops()
522 int srcreg = ESR_ELx_MOPS_ISS_SRCREG(esr); in do_el0_mops()
523 int sizereg = ESR_ELx_MOPS_ISS_SIZEREG(esr); in do_el0_mops()
535 if (esr & ESR_ELx_MOPS_ISS_MEM_INST) { in do_el0_mops()
562 if (esr & ESR_ELx_MOPS_ISS_FROM_EPILOGUE) in do_el0_mops()
589 static void user_cache_maint_handler(unsigned long esr, struct pt_regs *regs) in user_cache_maint_handler() argument
592 int rt = ESR_ELx_SYS64_ISS_RT(esr); in user_cache_maint_handler()
593 int crm = (esr & ESR_ELx_SYS64_ISS_CRM_MASK) >> ESR_ELx_SYS64_ISS_CRM_SHIFT; in user_cache_maint_handler()
629 static void ctr_read_handler(unsigned long esr, struct pt_regs *regs) in ctr_read_handler() argument
631 int rt = ESR_ELx_SYS64_ISS_RT(esr); in ctr_read_handler()
648 static void cntvct_read_handler(unsigned long esr, struct pt_regs *regs) in cntvct_read_handler() argument
650 int rt = ESR_ELx_SYS64_ISS_RT(esr); in cntvct_read_handler()
656 static void cntfrq_read_handler(unsigned long esr, struct pt_regs *regs) in cntfrq_read_handler() argument
658 int rt = ESR_ELx_SYS64_ISS_RT(esr); in cntfrq_read_handler()
664 static void mrs_handler(unsigned long esr, struct pt_regs *regs) in mrs_handler() argument
668 rt = ESR_ELx_SYS64_ISS_RT(esr); in mrs_handler()
669 sysreg = esr_sys64_to_sysreg(esr); in mrs_handler()
675 static void wfi_handler(unsigned long esr, struct pt_regs *regs) in wfi_handler() argument
683 void (*handler)(unsigned long esr, struct pt_regs *regs);
732 static bool cp15_cond_valid(unsigned long esr, struct pt_regs *regs) in cp15_cond_valid() argument
737 if (!(esr & ESR_ELx_CV)) { in cp15_cond_valid()
746 cond = (esr & ESR_ELx_COND_MASK) >> ESR_ELx_COND_SHIFT; in cp15_cond_valid()
752 static void compat_cntfrq_read_handler(unsigned long esr, struct pt_regs *regs) in compat_cntfrq_read_handler() argument
754 int reg = (esr & ESR_ELx_CP15_32_ISS_RT_MASK) >> ESR_ELx_CP15_32_ISS_RT_SHIFT; in compat_cntfrq_read_handler()
769 static void compat_cntvct_read_handler(unsigned long esr, struct pt_regs *regs) in compat_cntvct_read_handler() argument
771 int rt = (esr & ESR_ELx_CP15_64_ISS_RT_MASK) >> ESR_ELx_CP15_64_ISS_RT_SHIFT; in compat_cntvct_read_handler()
772 int rt2 = (esr & ESR_ELx_CP15_64_ISS_RT2_MASK) >> ESR_ELx_CP15_64_ISS_RT2_SHIFT; in compat_cntvct_read_handler()
794 void do_el0_cp15(unsigned long esr, struct pt_regs *regs) in do_el0_cp15() argument
798 if (!cp15_cond_valid(esr, regs)) { in do_el0_cp15()
807 switch (ESR_ELx_EC(esr)) { in do_el0_cp15()
815 do_el0_undef(regs, esr); in do_el0_cp15()
820 if ((hook->esr_mask & esr) == hook->esr_val) { in do_el0_cp15()
821 hook->handler(esr, regs); in do_el0_cp15()
830 do_el0_undef(regs, esr); in do_el0_cp15()
834 void do_el0_sys(unsigned long esr, struct pt_regs *regs) in do_el0_sys() argument
839 if ((hook->esr_mask & esr) == hook->esr_val) { in do_el0_sys()
840 hook->handler(esr, regs); in do_el0_sys()
849 do_el0_undef(regs, esr); in do_el0_sys()
899 const char *esr_get_class_string(unsigned long esr) in esr_get_class_string() argument
901 return esr_class_str[ESR_ELx_EC(esr)]; in esr_get_class_string()
908 void bad_el0_sync(struct pt_regs *regs, int reason, unsigned long esr) in bad_el0_sync() argument
913 current->thread.fault_code = esr; in bad_el0_sync()
924 void __noreturn panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigned long far) in panic_bad_stack() argument
933 pr_emerg("ESR: 0x%016lx -- %s\n", esr, esr_get_class_string(esr)); in panic_bad_stack()
954 void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr) in arm64_serror_panic() argument
959 smp_processor_id(), esr, esr_get_class_string(esr)); in arm64_serror_panic()
968 bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned long esr) in arm64_is_fatal_ras_serror() argument
970 unsigned long aet = arm64_ras_serror_get_severity(esr); in arm64_is_fatal_ras_serror()
996 arm64_serror_panic(regs, esr); in arm64_is_fatal_ras_serror()
1000 void do_serror(struct pt_regs *regs, unsigned long esr) in do_serror() argument
1003 if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr)) in do_serror()
1004 arm64_serror_panic(regs, esr); in do_serror()
1022 static int bug_handler(struct pt_regs *regs, unsigned long esr) in bug_handler() argument
1026 die("Oops - BUG", regs, esr); in bug_handler()
1048 static int cfi_handler(struct pt_regs *regs, unsigned long esr) in cfi_handler() argument
1053 target = pt_regs_read_reg(regs, FIELD_GET(CFI_BRK_IMM_TARGET, esr)); in cfi_handler()
1054 type = (u32)pt_regs_read_reg(regs, FIELD_GET(CFI_BRK_IMM_TYPE, esr)); in cfi_handler()
1058 die("Oops - CFI", regs, esr); in cfi_handler()
1079 static int reserved_fault_handler(struct pt_regs *regs, unsigned long esr) in reserved_fault_handler() argument
1099 #define KASAN_ESR_SIZE(esr) (1 << ((esr) & KASAN_ESR_SIZE_MASK)) argument
1101 static int kasan_handler(struct pt_regs *regs, unsigned long esr) in kasan_handler() argument
1103 bool recover = esr & KASAN_ESR_RECOVER; in kasan_handler()
1104 bool write = esr & KASAN_ESR_WRITE; in kasan_handler()
1105 size_t size = KASAN_ESR_SIZE(esr); in kasan_handler()
1126 die("Oops - KASAN", regs, esr); in kasan_handler()
1141 static int ubsan_handler(struct pt_regs *regs, unsigned long esr) in ubsan_handler() argument
1143 die(report_ubsan_failure(regs, esr & UBSAN_BRK_MASK), regs, esr); in ubsan_handler()
1154 #define esr_comment(esr) ((esr) & ESR_ELx_BRK64_ISS_COMMENT_MASK) argument
1160 int __init early_brk64(unsigned long addr, unsigned long esr, in early_brk64() argument
1164 if ((esr_comment(esr) & ~CFI_BRK_IMM_MASK) == CFI_BRK_IMM_BASE) in early_brk64()
1165 return cfi_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1168 if ((esr_comment(esr) & ~KASAN_BRK_MASK) == KASAN_BRK_IMM) in early_brk64()
1169 return kasan_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1172 if ((esr_comment(esr) & ~UBSAN_BRK_MASK) == UBSAN_BRK_IMM) in early_brk64()
1173 return ubsan_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1175 return bug_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()