| /linux-6.15/arch/arm64/mm/ |
| H A D | fault.c | 74 if (esr & ESR_ELx_ISV) { in data_abort_decode() 107 ESR_ELx_EC(esr), esr_get_class_string(esr), in mem_abort_decode() 119 data_abort_decode(esr); in mem_abort_decode() 261 if (!is_el1_data_abort(esr) && !is_el1_instruction_abort(esr)) in is_el1_permission_fault() 281 if (!is_el1_data_abort(esr) || !esr_fsc_is_translation_fault(esr)) in is_spurious_el1_translation_fault() 315 mem_abort_decode(esr); in die_kernel_fault() 378 if (!is_el1_instruction_abort(esr) && fixup_exception(regs, esr)) in __do_kernel_fault() 463 esr = 0; in set_thread_esr() 526 return (esr & ESR_ELx_WNR) && !(esr & ESR_ELx_CM); in is_write_abort() 540 return esr_is_data_abort(esr) && is_write_abort(esr); in is_invalid_gcs_access() [all …]
|
| H A D | extable.c | 15 unsigned long esr) in cpy_faulted_on_uaccess() argument 18 bool fault_on_write = esr & ESR_ELx_WNR; in cpy_faulted_on_uaccess() 23 bool insn_may_access_user(unsigned long addr, unsigned long esr) in insn_may_access_user() argument 32 return cpy_faulted_on_uaccess(ex, esr); in insn_may_access_user() 58 struct pt_regs *regs, unsigned long esr) in ex_handler_uaccess_cpy() argument 61 if (!cpy_faulted_on_uaccess(ex, esr)) in ex_handler_uaccess_cpy() 95 bool fixup_exception(struct pt_regs *regs, unsigned long esr) in fixup_exception() argument 110 return ex_handler_uaccess_cpy(ex, regs, esr); in fixup_exception()
|
| /linux-6.15/arch/arm64/include/asm/ |
| H A D | esr.h | 75 #define ESR_ELx_EC(esr) (((esr) & ESR_ELx_EC_MASK) >> ESR_ELx_EC_SHIFT) argument 80 #define ESR_ELx_ISS(esr) ((esr) & ESR_ELx_ISS_MASK) argument 83 #define ESR_ELx_ISS2(esr) (((esr) & ESR_ELx_ISS2_MASK) >> ESR_ELx_ISS2_SHIFT) argument 394 #define ESR_ELx_MOPS_ISS_SRCREG(esr) (((esr) & (UL(0x1f) << 5)) >> 5) argument 395 #define ESR_ELx_MOPS_ISS_SIZEREG(esr) (((esr) & (UL(0x1f) << 0)) >> 0) argument 445 esr = esr & ESR_ELx_FSC; in esr_fsc_is_translation_fault() 456 esr = esr & ESR_ELx_FSC; in esr_fsc_is_permission_fault() 466 esr = esr & ESR_ELx_FSC; in esr_fsc_is_access_flag_fault() 476 esr &= ESR_ELx_FSC; in esr_fsc_is_addr_sz_fault() 487 esr = esr & ESR_ELx_FSC; in esr_fsc_is_sea_ttw() [all …]
|
| H A D | exception.h | 19 unsigned long esr = ESR_ELx_EC_SERROR << ESR_ELx_EC_SHIFT; in disr_to_esr() local 22 esr |= (disr & DISR_EL1_ESR_MASK); in disr_to_esr() 24 esr |= (disr & ESR_ELx_ISS_MASK); in disr_to_esr() 26 return esr; in disr_to_esr() 59 void do_el1_bti(struct pt_regs *regs, unsigned long esr); 60 void do_el0_gcs(struct pt_regs *regs, unsigned long esr); 61 void do_el1_gcs(struct pt_regs *regs, unsigned long esr); 65 void do_sve_acc(unsigned long esr, struct pt_regs *regs); 66 void do_sme_acc(unsigned long esr, struct pt_regs *regs); 68 void do_el0_sys(unsigned long esr, struct pt_regs *regs); [all …]
|
| H A D | traps.h | 61 static inline bool arm64_is_ras_serror(unsigned long esr) in arm64_is_ras_serror() argument 65 if (esr & ESR_ELx_IDS) in arm64_is_ras_serror() 83 unsigned long aet = esr & ESR_ELx_AET; in arm64_ras_serror_get_severity() 85 if (!arm64_is_ras_serror(esr)) { in arm64_ras_serror_get_severity() 94 if ((esr & ESR_ELx_FSC) != ESR_ELx_FSC_SERROR) { in arm64_ras_serror_get_severity() 108 bool option_a = esr & ESR_ELx_MOPS_ISS_OPTION_A; in arm64_mops_reset_regs() 109 int dstreg = ESR_ELx_MOPS_ISS_DESTREG(esr); in arm64_mops_reset_regs() 110 int srcreg = ESR_ELx_MOPS_ISS_SRCREG(esr); in arm64_mops_reset_regs() 111 int sizereg = ESR_ELx_MOPS_ISS_SIZEREG(esr); in arm64_mops_reset_regs() 122 if (esr & ESR_ELx_MOPS_ISS_MEM_INST) { in arm64_mops_reset_regs() [all …]
|
| H A D | kvm_emulate.h | 61 u64 esr = FIELD_PREP(ESR_ELx_EC_MASK, ESR_ELx_EC_SVE) | in kvm_inject_nested_sve_trap() local 64 kvm_inject_nested_sync(vcpu, esr); in kvm_inject_nested_sve_trap() 280 u64 esr = kvm_vcpu_get_esr(vcpu); in guest_hyp_wfx_traps_enabled() local 281 bool is_wfe = !!(esr & ESR_ELx_WFx_ISS_WFE); in guest_hyp_wfx_traps_enabled() 293 u64 esr = kvm_vcpu_get_esr(vcpu); in kvm_vcpu_get_condition() local 295 if (esr & ESR_ELx_CV) in kvm_vcpu_get_condition() 296 return (esr & ESR_ELx_COND_MASK) >> ESR_ELx_COND_SHIFT; in kvm_vcpu_get_condition() 413 unsigned long esr = kvm_vcpu_get_esr(vcpu); in kvm_vcpu_trap_get_perm_fault_granule() local 415 BUG_ON(!esr_fsc_is_permission_fault(esr)); in kvm_vcpu_trap_get_perm_fault_granule() 434 u64 esr = kvm_vcpu_get_esr(vcpu); in kvm_vcpu_sys_get_rt() local [all …]
|
| H A D | extable.h | 36 bool insn_may_access_user(unsigned long addr, unsigned long esr); 50 bool fixup_exception(struct pt_regs *regs, unsigned long esr);
|
| H A D | debug-monitors.h | 67 int (*fn)(struct pt_regs *regs, unsigned long esr); 78 int (*fn)(struct pt_regs *regs, unsigned long esr);
|
| /linux-6.15/arch/arm64/kernel/ |
| H A D | entry-common.c | 517 el1_pc(regs, esr); in el1h_64_sync_handler() 524 el1_bti(regs, esr); in el1h_64_sync_handler() 527 el1_gcs(regs, esr); in el1h_64_sync_handler() 536 el1_dbg(regs, esr); in el1h_64_sync_handler() 765 el0_da(regs, esr); in el0t_64_sync_handler() 768 el0_ia(regs, esr); in el0t_64_sync_handler() 787 el0_sp(regs, esr); in el0t_64_sync_handler() 790 el0_pc(regs, esr); in el0t_64_sync_handler() 900 el0_da(regs, esr); in el0t_32_sync_handler() 903 el0_ia(regs, esr); in el0t_32_sync_handler() [all …]
|
| H A D | traps.c | 249 if (esr) in arm64_show_signal() 250 pr_cont("%s, ESR 0x%016lx, ", esr_get_class_string(esr), esr); in arm64_show_signal() 792 do_el0_undef(regs, esr); in do_el0_cp15() 807 do_el0_undef(regs, esr); in do_el0_cp15() 826 do_el0_undef(regs, esr); in do_el0_sys() 911 pr_emerg("ESR: 0x%016lx -- %s\n", esr, esr_get_class_string(esr)); in panic_bad_stack() 937 smp_processor_id(), esr, esr_get_class_string(esr)); in arm64_serror_panic() 981 if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(regs, esr)) in do_serror() 1077 #define KASAN_ESR_SIZE(esr) (1 << ((esr) & KASAN_ESR_SIZE_MASK)) argument 1121 die(report_ubsan_failure(regs, esr & UBSAN_BRK_MASK), regs, esr); in ubsan_handler() [all …]
|
| H A D | debug-monitors.c | 205 static int call_step_hook(struct pt_regs *regs, unsigned long esr) in call_step_hook() argument 218 retval = hook->fn(regs, esr); in call_step_hook() 241 static int single_step_handler(unsigned long unused, unsigned long esr, in single_step_handler() argument 253 if (!handler_found && call_step_hook(regs, esr) == DBG_HOOK_HANDLED) in single_step_handler() 302 static int call_break_hook(struct pt_regs *regs, unsigned long esr) in call_break_hook() argument 314 if ((esr_brk_comment(esr) & ~hook->mask) == hook->imm) in call_break_hook() 315 return hook->fn(regs, esr); in call_break_hook() 322 static int brk_handler(unsigned long unused, unsigned long esr, in brk_handler() argument 325 if (call_break_hook(regs, esr) == DBG_HOOK_HANDLED) in brk_handler()
|
| /linux-6.15/tools/arch/arm64/include/asm/ |
| H A D | esr.h | 73 #define ESR_ELx_EC(esr) (((esr) & ESR_ELx_EC_MASK) >> ESR_ELx_EC_SHIFT) argument 78 #define ESR_ELx_ISS(esr) ((esr) & ESR_ELx_ISS_MASK) argument 81 #define ESR_ELx_ISS2(esr) (((esr) & ESR_ELx_ISS2_MASK) >> ESR_ELx_ISS2_SHIFT) argument 224 #define ESR_ELx_SYS64_ISS_RT(esr) \ argument 384 #define ESR_ELx_MOPS_ISS_DESTREG(esr) (((esr) & (UL(0x1f) << 10)) >> 10) argument 385 #define ESR_ELx_MOPS_ISS_SRCREG(esr) (((esr) & (UL(0x1f) << 5)) >> 5) argument 386 #define ESR_ELx_MOPS_ISS_SIZEREG(esr) (((esr) & (UL(0x1f) << 0)) >> 0) argument 411 esr = esr & ESR_ELx_FSC; in esr_fsc_is_translation_fault() 422 esr = esr & ESR_ELx_FSC; in esr_fsc_is_permission_fault() 432 esr = esr & ESR_ELx_FSC; in esr_fsc_is_access_flag_fault() [all …]
|
| /linux-6.15/arch/arm64/kvm/hyp/include/hyp/ |
| H A D | fault.h | 15 static inline bool __fault_safe_to_translate(u64 esr) in __fault_safe_to_translate() argument 17 u64 fsc = esr & ESR_ELx_FSC; in __fault_safe_to_translate() 19 if (esr_fsc_is_sea_ttw(esr) || esr_fsc_is_secc_ttw(esr)) in __fault_safe_to_translate() 22 return !(fsc == ESR_ELx_FSC_EXTABT && (esr & ESR_ELx_FnV)); in __fault_safe_to_translate() 60 static inline bool __hpfar_valid(u64 esr) in __hpfar_valid() argument 70 esr_fsc_is_translation_fault(esr)) in __hpfar_valid() 73 if (esr_fsc_is_translation_fault(esr) || esr_fsc_is_access_flag_fault(esr)) in __hpfar_valid() 76 if ((esr & ESR_ELx_S1PTW) && esr_fsc_is_permission_fault(esr)) in __hpfar_valid() 79 return esr_fsc_is_addr_sz_fault(esr); in __hpfar_valid() 89 if (__hpfar_valid(esr)) in __get_fault_info() [all …]
|
| /linux-6.15/arch/arm64/kvm/ |
| H A D | inject_fault.c | 61 u64 esr = 0; in inject_abt64() local 70 esr |= ESR_ELx_IL; in inject_abt64() 84 esr |= ESR_ELx_FSC_EXTABT; in inject_abt64() 88 vcpu_write_sys_reg(vcpu, esr, ESR_EL1); in inject_abt64() 91 vcpu_write_sys_reg(vcpu, esr, ESR_EL2); in inject_abt64() 106 esr |= ESR_ELx_IL; in inject_undef64() 109 vcpu_write_sys_reg(vcpu, esr, ESR_EL1); in inject_undef64() 111 vcpu_write_sys_reg(vcpu, esr, ESR_EL2); in inject_undef64() 192 unsigned long addr, esr; in kvm_inject_size_fault() local 213 esr = vcpu_read_sys_reg(vcpu, ESR_EL1); in kvm_inject_size_fault() [all …]
|
| H A D | handle_exit.c | 33 if (!arm64_is_ras_serror(esr) || arm64_is_fatal_ras_serror(NULL, esr)) in kvm_handle_guest_serror() 131 u64 esr = kvm_vcpu_get_esr(vcpu); in kvm_handle_wfx() local 145 if (esr & ESR_ELx_WFx_ISS_WFxT) { in kvm_handle_wfx() 146 if (esr & ESR_ELx_WFx_ISS_RV) { in kvm_handle_wfx() 156 esr &= ~ESR_ELx_WFx_ISS_WFxT; in kvm_handle_wfx() 160 if (esr & ESR_ELx_WFx_ISS_WFE) { in kvm_handle_wfx() 163 if (esr & ESR_ELx_WFx_ISS_WFxT) in kvm_handle_wfx() 188 u64 esr = kvm_vcpu_get_esr(vcpu); in kvm_handle_guest_debug() local 198 switch (ESR_ELx_EC(esr)) { in kvm_handle_guest_debug() 215 esr, esr_get_class_string(esr)); in kvm_handle_unknown_ec() [all …]
|
| H A D | sys_regs.h | 39 .Op1 = ((esr) >> 14) & 0x7, \ 40 .CRn = ((esr) >> 10) & 0xf, \ 41 .CRm = ((esr) >> 1) & 0xf, \ 42 .Op2 = ((esr) >> 17) & 0x7, \ 43 .is_write = !((esr) & 1) }) 45 #define esr_cp1x_32_to_params(esr) \ argument 46 ((struct sys_reg_params){ .Op1 = ((esr) >> 14) & 0x7, \ 47 .CRn = ((esr) >> 10) & 0xf, \ 48 .CRm = ((esr) >> 1) & 0xf, \ 49 .Op2 = ((esr) >> 17) & 0x7, \ [all …]
|
| H A D | trace_arm.h | 140 TP_PROTO(unsigned long vcpu_pc, unsigned long esr, 142 TP_ARGS(vcpu_pc, esr, far, ipa), 146 __field( unsigned long, esr ) 153 __entry->esr = esr; 159 __entry->ipa, __entry->esr,
|
| H A D | nested.c | 114 u32 esr; in esr_s2_fault() local 116 esr = kvm_vcpu_get_esr(vcpu) & ~ESR_ELx_FSC; in esr_s2_fault() 117 esr |= compute_fsc(level, fsc); in esr_s2_fault() 118 return esr; in esr_s2_fault() 216 out->esr = compute_fsc(level, ESR_ELx_FSC_ADDRSZ); in walk_nested_s2_pgd() 245 out->esr = compute_fsc(level, ESR_ELx_FSC_FAULT); in walk_nested_s2_pgd() 267 out->esr = compute_fsc(level, ESR_ELx_FSC_FAULT); in walk_nested_s2_pgd() 273 out->esr = compute_fsc(level, ESR_ELx_FSC_ADDRSZ); in walk_nested_s2_pgd() 279 out->esr = compute_fsc(level, ESR_ELx_FSC_ACCESS); in walk_nested_s2_pgd() 332 result->esr = 0; in kvm_walk_nested_s2() [all …]
|
| /linux-6.15/arch/sh/boards/mach-dreamcast/ |
| H A D | irq.c | 90 __u32 esr = ESR_BASE + (LEVEL(irq) << 2); in mask_ack_systemasic_irq() local 92 outl((1 << EVENT_BIT(irq)), esr); in mask_ack_systemasic_irq() 107 __u32 emr, esr, status, level; in systemasic_irq_demux() local 124 esr = ESR_BASE + (level << 2); in systemasic_irq_demux() 127 status = inl(esr); in systemasic_irq_demux()
|
| /linux-6.15/drivers/net/can/ |
| H A D | bxcan.c | 158 u32 esr; /* 0x18 - error status */ member 482 if (esr & BXCAN_ESR_BOFF) in bxcan_handle_state_change() 484 else if (esr & BXCAN_ESR_EPVF) in bxcan_handle_state_change() 486 else if (esr & BXCAN_ESR_EWGF) in bxcan_handle_state_change() 524 lec_code = FIELD_GET(BXCAN_ESR_LEC_MASK, esr); in bxcan_handle_bus_err() 607 u32 msr, esr; in bxcan_state_change_isr() local 613 esr = readl(®s->esr); in bxcan_state_change_isr() 614 bxcan_handle_state_change(ndev, esr); in bxcan_state_change_isr() 617 bxcan_handle_bus_err(ndev, esr); in bxcan_state_change_isr() 916 u32 esr; in bxcan_get_berr_counter() local [all …]
|
| /linux-6.15/drivers/net/ethernet/ibm/emac/ |
| H A D | mal.c | 222 u32 esr = get_mal_dcrn(mal, MAL_ESR); in mal_serr() local 225 set_mal_dcrn(mal, MAL_ESR, esr); in mal_serr() 227 MAL_DBG(mal, "SERR %08x" NL, esr); in mal_serr() 229 if (esr & MAL_ESR_EVB) { in mal_serr() 230 if (esr & MAL_ESR_DE) { in mal_serr() 237 if (esr & MAL_ESR_PEIN) { in mal_serr() 245 mal->index, esr); in mal_serr() 255 mal->index, esr); in mal_serr() 357 if (esr & MAL_ESR_EVB) { in mal_int() 359 if (esr & MAL_ESR_DE) { in mal_int() [all …]
|
| /linux-6.15/arch/arm64/kvm/hyp/vhe/ |
| H A D | switch.c | 299 u64 esr, val; in kvm_hyp_handle_timer() local 310 esr = kvm_vcpu_get_esr(vcpu); in kvm_hyp_handle_timer() 311 if ((esr & ESR_ELx_SYS64_ISS_DIR_MASK) != ESR_ELx_SYS64_ISS_DIR_READ) in kvm_hyp_handle_timer() 314 switch (esr_sys64_to_sysreg(esr)) { in kvm_hyp_handle_timer() 375 u64 esr = kvm_vcpu_get_esr(vcpu); in kvm_hyp_handle_eret() local 411 if (esr_iss_is_eretax(esr)) { in kvm_hyp_handle_eret() 469 u64 esr = kvm_vcpu_get_esr(vcpu); in kvm_hyp_handle_cpacr_el1() local 472 if (!is_hyp_ctxt(vcpu) || esr_sys64_to_sysreg(esr) != SYS_CPACR_EL1) in kvm_hyp_handle_cpacr_el1() 477 if ((esr & ESR_ELx_SYS64_ISS_DIR_MASK) == ESR_ELx_SYS64_ISS_DIR_READ) { in kvm_hyp_handle_cpacr_el1()
|
| /linux-6.15/arch/powerpc/platforms/44x/ |
| H A D | machine_check.c | 14 unsigned long reason = regs->esr; in machine_check_4xx() 29 unsigned long reason = regs->esr; in machine_check_440A() 66 unsigned long reason = regs->esr; in machine_check_47x()
|
| /linux-6.15/tools/testing/selftests/kvm/arm64/ |
| H A D | mmio_abort.c | 16 u64 esr = read_sysreg(esr_el1); in expect_sea_handler() local 19 GUEST_ASSERT_EQ(ESR_ELx_EC(esr), ESR_ELx_EC_DABT_CUR); in expect_sea_handler() 20 GUEST_ASSERT_EQ(esr & ESR_ELx_FSC_TYPE, ESR_ELx_FSC_EXTABT); in expect_sea_handler()
|
| /linux-6.15/sound/soc/fsl/ |
| H A D | fsl_esai.c | 102 u32 esr; in esai_isr() local 121 if (esr & ESAI_ESR_RFF_MASK) in esai_isr() 124 if (esr & ESAI_ESR_TFE_MASK) in esai_isr() 127 if (esr & ESAI_ESR_TLS_MASK) in esai_isr() 130 if (esr & ESAI_ESR_TDE_MASK) in esai_isr() 133 if (esr & ESAI_ESR_TED_MASK) in esai_isr() 136 if (esr & ESAI_ESR_TD_MASK) in esai_isr() 139 if (esr & ESAI_ESR_RLS_MASK) in esai_isr() 142 if (esr & ESAI_ESR_RDE_MASK) in esai_isr() 145 if (esr & ESAI_ESR_RED_MASK) in esai_isr() [all …]
|