mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-10-09 10:02:19 +01:00
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:

committed by
Anup Patel

parent
55135abcd5
commit
f04ae48263
@@ -1037,10 +1037,6 @@ int sbi_hart_reinit(struct sbi_scratch *scratch)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = delegate_traps(scratch);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1068,6 +1064,10 @@ int sbi_hart_init(struct sbi_scratch *scratch, bool cold_boot)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = delegate_traps(scratch);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
return sbi_hart_reinit(scratch);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user