Lines Matching refs:esr
239 unsigned long esr = tsk->thread.fault_code; in arm64_show_signal() local
249 if (esr) in arm64_show_signal()
250 pr_cont("%s, ESR 0x%016lx, ", esr_get_class_string(esr), esr); in arm64_show_signal()
452 void do_el0_undef(struct pt_regs *regs, unsigned long esr) in do_el0_undef() argument
473 void do_el1_undef(struct pt_regs *regs, unsigned long esr) in do_el1_undef() argument
484 die("Oops - Undefined instruction", regs, esr); in do_el1_undef()
492 void do_el1_bti(struct pt_regs *regs, unsigned long esr) in do_el1_bti() argument
498 die("Oops - BTI", regs, esr); in do_el1_bti()
501 void do_el0_gcs(struct pt_regs *regs, unsigned long esr) in do_el0_gcs() argument
506 void do_el1_gcs(struct pt_regs *regs, unsigned long esr) in do_el1_gcs() argument
508 die("Oops - GCS", regs, esr); in do_el1_gcs()
511 void do_el0_fpac(struct pt_regs *regs, unsigned long esr) in do_el0_fpac() argument
513 force_signal_inject(SIGILL, ILL_ILLOPN, regs->pc, esr); in do_el0_fpac()
516 void do_el1_fpac(struct pt_regs *regs, unsigned long esr) in do_el1_fpac() argument
522 die("Oops - FPAC", regs, esr); in do_el1_fpac()
525 void do_el0_mops(struct pt_regs *regs, unsigned long esr) in do_el0_mops() argument
527 arm64_mops_reset_regs(®s->user_regs, esr); in do_el0_mops()
536 void do_el1_mops(struct pt_regs *regs, unsigned long esr) in do_el1_mops() argument
538 arm64_mops_reset_regs(®s->user_regs, esr); in do_el1_mops()
558 static void user_cache_maint_handler(unsigned long esr, struct pt_regs *regs) in user_cache_maint_handler() argument
561 int rt = ESR_ELx_SYS64_ISS_RT(esr); in user_cache_maint_handler()
562 int crm = (esr & ESR_ELx_SYS64_ISS_CRM_MASK) >> ESR_ELx_SYS64_ISS_CRM_SHIFT; in user_cache_maint_handler()
598 static void ctr_read_handler(unsigned long esr, struct pt_regs *regs) in ctr_read_handler() argument
600 int rt = ESR_ELx_SYS64_ISS_RT(esr); in ctr_read_handler()
617 static void cntvct_read_handler(unsigned long esr, struct pt_regs *regs) in cntvct_read_handler() argument
622 int rt = ESR_ELx_SYS64_ISS_RT(esr); in cntvct_read_handler()
629 static void cntfrq_read_handler(unsigned long esr, struct pt_regs *regs) in cntfrq_read_handler() argument
634 int rt = ESR_ELx_SYS64_ISS_RT(esr); in cntfrq_read_handler()
641 static void mrs_handler(unsigned long esr, struct pt_regs *regs) in mrs_handler() argument
645 rt = ESR_ELx_SYS64_ISS_RT(esr); in mrs_handler()
646 sysreg = esr_sys64_to_sysreg(esr); in mrs_handler()
652 static void wfi_handler(unsigned long esr, struct pt_regs *regs) in wfi_handler() argument
660 void (*handler)(unsigned long esr, struct pt_regs *regs);
709 static bool cp15_cond_valid(unsigned long esr, struct pt_regs *regs) in cp15_cond_valid() argument
714 if (!(esr & ESR_ELx_CV)) { in cp15_cond_valid()
723 cond = (esr & ESR_ELx_COND_MASK) >> ESR_ELx_COND_SHIFT; in cp15_cond_valid()
729 static void compat_cntfrq_read_handler(unsigned long esr, struct pt_regs *regs) in compat_cntfrq_read_handler() argument
731 int reg = (esr & ESR_ELx_CP15_32_ISS_RT_MASK) >> ESR_ELx_CP15_32_ISS_RT_SHIFT; in compat_cntfrq_read_handler()
746 static void compat_cntvct_read_handler(unsigned long esr, struct pt_regs *regs) in compat_cntvct_read_handler() argument
748 int rt = (esr & ESR_ELx_CP15_64_ISS_RT_MASK) >> ESR_ELx_CP15_64_ISS_RT_SHIFT; in compat_cntvct_read_handler()
749 int rt2 = (esr & ESR_ELx_CP15_64_ISS_RT2_MASK) >> ESR_ELx_CP15_64_ISS_RT2_SHIFT; in compat_cntvct_read_handler()
771 void do_el0_cp15(unsigned long esr, struct pt_regs *regs) in do_el0_cp15() argument
775 if (!cp15_cond_valid(esr, regs)) { in do_el0_cp15()
784 switch (ESR_ELx_EC(esr)) { in do_el0_cp15()
792 do_el0_undef(regs, esr); in do_el0_cp15()
797 if ((hook->esr_mask & esr) == hook->esr_val) { in do_el0_cp15()
798 hook->handler(esr, regs); in do_el0_cp15()
807 do_el0_undef(regs, esr); in do_el0_cp15()
811 void do_el0_sys(unsigned long esr, struct pt_regs *regs) in do_el0_sys() argument
816 if ((hook->esr_mask & esr) == hook->esr_val) { in do_el0_sys()
817 hook->handler(esr, regs); in do_el0_sys()
826 do_el0_undef(regs, esr); in do_el0_sys()
877 const char *esr_get_class_string(unsigned long esr) in esr_get_class_string() argument
879 return esr_class_str[ESR_ELx_EC(esr)]; in esr_get_class_string()
886 void bad_el0_sync(struct pt_regs *regs, int reason, unsigned long esr) in bad_el0_sync() argument
891 current->thread.fault_code = esr; in bad_el0_sync()
902 void __noreturn panic_bad_stack(struct pt_regs *regs, unsigned long esr, unsigned long far) in panic_bad_stack() argument
911 pr_emerg("ESR: 0x%016lx -- %s\n", esr, esr_get_class_string(esr)); in panic_bad_stack()
932 void __noreturn arm64_serror_panic(struct pt_regs *regs, unsigned long esr) in arm64_serror_panic() argument
937 smp_processor_id(), esr, esr_get_class_string(esr)); in arm64_serror_panic()
946 bool arm64_is_fatal_ras_serror(struct pt_regs *regs, unsigned long esr) in arm64_is_fatal_ras_serror() argument
948 unsigned long aet = arm64_ras_serror_get_severity(esr); in arm64_is_fatal_ras_serror()
974 arm64_serror_panic(regs, esr); in arm64_is_fatal_ras_serror()
978 void do_serror(struct pt_regs *regs, unsigned long esr) in do_serror() argument
981 if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr)) in do_serror()
982 arm64_serror_panic(regs, esr); in do_serror()
1000 static int bug_handler(struct pt_regs *regs, unsigned long esr) in bug_handler() argument
1004 die("Oops - BUG", regs, esr); in bug_handler()
1026 static int cfi_handler(struct pt_regs *regs, unsigned long esr) in cfi_handler() argument
1031 target = pt_regs_read_reg(regs, FIELD_GET(CFI_BRK_IMM_TARGET, esr)); in cfi_handler()
1032 type = (u32)pt_regs_read_reg(regs, FIELD_GET(CFI_BRK_IMM_TYPE, esr)); in cfi_handler()
1036 die("Oops - CFI", regs, esr); in cfi_handler()
1057 static int reserved_fault_handler(struct pt_regs *regs, unsigned long esr) in reserved_fault_handler() argument
1077 #define KASAN_ESR_SIZE(esr) (1 << ((esr) & KASAN_ESR_SIZE_MASK)) argument
1079 static int kasan_handler(struct pt_regs *regs, unsigned long esr) in kasan_handler() argument
1081 bool recover = esr & KASAN_ESR_RECOVER; in kasan_handler()
1082 bool write = esr & KASAN_ESR_WRITE; in kasan_handler()
1083 size_t size = KASAN_ESR_SIZE(esr); in kasan_handler()
1104 die("Oops - KASAN", regs, esr); in kasan_handler()
1119 static int ubsan_handler(struct pt_regs *regs, unsigned long esr) in ubsan_handler() argument
1121 die(report_ubsan_failure(regs, esr & UBSAN_BRK_MASK), regs, esr); in ubsan_handler()
1136 int __init early_brk64(unsigned long addr, unsigned long esr, in early_brk64() argument
1140 if (esr_is_cfi_brk(esr)) in early_brk64()
1141 return cfi_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1144 if ((esr_brk_comment(esr) & ~KASAN_BRK_MASK) == KASAN_BRK_IMM) in early_brk64()
1145 return kasan_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1148 if ((esr_brk_comment(esr) & ~UBSAN_BRK_MASK) == UBSAN_BRK_IMM) in early_brk64()
1149 return ubsan_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()
1151 return bug_handler(regs, esr) != DBG_HOOK_HANDLED; in early_brk64()