lib: sbi: Remove sbi_trap_exit() and related code

Over the years, no uses of sbi_trap_exit() have been found so remove
it and also remove related code from fw_base.S and sbi_scratch.h.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
This commit is contained in:
Anup Patel
2024-03-11 11:04:50 +05:30
committed by Anup Patel
parent 2e8517865a
commit ebb697ad8c
4 changed files with 3 additions and 44 deletions

View File

@@ -334,22 +334,3 @@ trap_error:
sbi_trap_error(msg, rc, mcause, mtval, mtval2, mtinst, regs);
return regs;
}
typedef void (*trap_exit_t)(const struct sbi_trap_regs *regs);
/**
* Exit trap/interrupt handling
*
* This function is called by non-firmware code to abruptly exit
* trap/interrupt handling and resume execution at context pointed
* by given register state.
*
* @param regs pointer to register state
*/
void __noreturn sbi_trap_exit(const struct sbi_trap_regs *regs)
{
struct sbi_scratch *scratch = sbi_scratch_thishart_ptr();
((trap_exit_t)scratch->trap_exit)(regs);
__builtin_unreachable();
}