On 16/10/2026 17:55, Leo Yan wrote:
trbe_get_fault_act() currently handles only a small set of TRBE stop reasons: external aborts, trigger events and stage 1 and 2 aborts. Other TRBSR_EL1 EC/BSC values are reported as spurious events, which hides useful failure information and makes the status handling hard to extend.
Decode the EC and BSC fields explicitly. Keep the normal fill-mode handling unchanged, but treat unsupported or unexpected status values as fatal and report them with a ratelimited diagnostic containing TRBSR_EL1, TRBPTR_EL1 and TRBLIMITR_EL1. Use %p for the buffer pointers so the printk diagnostic hashes their address values by default.
Stop using is_trbe_trg(), instead, use TRBSR_EL1_BSC_TRIGGER_EVENT as the unsupported trigger case. This keeps the stop-reason handling in the EC/BSC decode path, the driver can validate the status fields safely.
Move the TRBSR_EL1 BSC definitions to the arm64 sysreg header, and use the common TRBSR_EL1 EC/BSC names in the TRBE driver.
Signed-off-by: Leo Yan leo.yan@arm.com
Reviewed-by: Suzuki K Poulose suzuki.poulose@arm.com