From f6e40ee151e68fbd403925341185e9b038f19164 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 23 Oct 2025 13:12:50 +0100 Subject: [PATCH] target/arm: Use el local indexing mair_el We already have regime_el() computed to a local. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20251014195017.421681-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/ptw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 54c45fc9fe..5fcf104272 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -2319,7 +2319,7 @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw, /* Index into MAIR registers for cache attributes */ attrindx = extract32(attrs, 2, 3); - mair = env->cp15.mair_el[regime_el(mmu_idx)]; + mair = env->cp15.mair_el[el]; result->cacheattrs.is_s2_format = false; result->cacheattrs.attrs = extract64(mair, attrindx * 8, 8); -- 2.47.3