lib: sbi_hart: Do not call delegate_traps() in the resume flow

The only purpose of this function is to program the initial values of
mideleg and medeleg. However, both of these CSRs are now saved/restored
across non-retentive suspend, so the values from this function are
always overwritten by the restored values.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250908055646.2391370-2-samuel.holland@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2025-09-07 22:56:39 -07:00
committed by Anup Patel
parent 55135abcd5
commit f04ae48263

View File

@@ -1037,10 +1037,6 @@ int sbi_hart_reinit(struct sbi_scratch *scratch)
if (rc) if (rc)
return rc; return rc;
rc = delegate_traps(scratch);
if (rc)
return rc;
return 0; return 0;
} }
@@ -1068,6 +1064,10 @@ int sbi_hart_init(struct sbi_scratch *scratch, bool cold_boot)
if (rc) if (rc)
return rc; return rc;
rc = delegate_traps(scratch);
if (rc)
return rc;
return sbi_hart_reinit(scratch); return sbi_hart_reinit(scratch);
} }