summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnup Patel <[email protected]>2026-06-13 18:51:28 +0530
committerAnup Patel <[email protected]>2026-07-21 11:50:46 +0530
commitc504877ed00bd7c38168a6574db25562e3615a38 (patch)
treeeb2838cdbf6958b214d1481dc7761f4e92efb50e /include
parent110f28518a15e84498bcc6337242160c500857fe (diff)
lib: sbi: Move trap delegation setup to sbi_trap.c
Currently, the trap delegation setup is part of sbi_hart.c and called via sbi_hart_init() whereas the per-hart trap (aka exception and interrupt) handling is part of sbi_trap.c. Move trap delegation init to sbi_trap.c and call it via new sbi_trap_init() from both cold boot and warm boot path. This way trap delegation setup is in same place as trap handling. Signed-off-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_trap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sbi/sbi_trap.h b/include/sbi/sbi_trap.h
index 281366e7..04c420a0 100644
--- a/include/sbi/sbi_trap.h
+++ b/include/sbi/sbi_trap.h
@@ -350,6 +350,8 @@ struct sbi_trap_context *sbi_trap_handler(struct sbi_trap_context *tcntx);
struct sbi_trap_context *sbi_trap_rnmi_handler(struct sbi_trap_context *tcntx);
+int sbi_trap_init(struct sbi_scratch *scratch, bool cold_boot);
+
#endif
#endif