forked from Mirrors/opensbi
include: Make mstatus parameter optional for get_insn()
The mstatus parameter of get_insn() is used to return MSTATUS CSR value which get_insn() saw. Most of the get_insn() callers don't use the value returned in mstatus so this patch makes mstatus parameter optional for get_insn(). Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
@@ -26,8 +26,7 @@ int sbi_misaligned_load_handler(u32 hartid, ulong mcause,
|
||||
struct sbi_scratch *scratch)
|
||||
{
|
||||
union reg_data val;
|
||||
ulong mstatus = csr_read(CSR_MSTATUS);
|
||||
ulong insn = get_insn(regs->mepc, &mstatus);
|
||||
ulong insn = get_insn(regs->mepc, NULL);
|
||||
ulong addr = csr_read(CSR_MTVAL);
|
||||
int i, fp = 0, shift = 0, len = 0;
|
||||
|
||||
@@ -112,8 +111,7 @@ int sbi_misaligned_store_handler(u32 hartid, ulong mcause,
|
||||
struct sbi_scratch *scratch)
|
||||
{
|
||||
union reg_data val;
|
||||
ulong mstatus = csr_read(CSR_MSTATUS);
|
||||
ulong insn = get_insn(regs->mepc, &mstatus);
|
||||
ulong insn = get_insn(regs->mepc, NULL);
|
||||
ulong addr = csr_read(CSR_MTVAL);
|
||||
int i, len = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user