forked from Mirrors/opensbi
Introduce sbi_current_hartid()
Use this helper instead of hardcoding csr_read(mhartid). Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:
@@ -68,7 +68,7 @@ void sbi_trap_handler(struct sbi_trap_regs *regs,
|
||||
{
|
||||
int rc;
|
||||
const char *msg;
|
||||
u32 hartid = csr_read(mhartid);
|
||||
u32 hartid = sbi_current_hartid();
|
||||
ulong mcause = csr_read(mcause);
|
||||
|
||||
if (mcause & (1UL << (__riscv_xlen - 1))) {
|
||||
|
Reference in New Issue
Block a user