diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-11-16 16:08:27 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-11-21 13:54:13 +0530 |
commit | 838657c0524f148d8aaec8225cd0ab9e2e2c7303 (patch) | |
tree | c73c3551b6d9e58ec3d96edb43468688aacb8660 /lib/sbi/sbi_trap.c | |
parent | 215421ca610a64b8ec188c96ea8588ae2de41fb7 (diff) |
include: Remove ilen member of struct unpriv_trap
We simplify struct unpriv_trap by removing ilen member. This
can be achieved by ensuring that at all unpriv load/store
instructions are 4 bytes long using GCC assembler option.
Additionally, this also reduces few instructions from unpriv
load/store functions.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_trap.c')
-rw-r--r-- | lib/sbi/sbi_trap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sbi/sbi_trap.c b/lib/sbi/sbi_trap.c index 93a0404..5274c8b 100644 --- a/lib/sbi/sbi_trap.c +++ b/lib/sbi/sbi_trap.c @@ -262,7 +262,7 @@ void sbi_trap_handler(struct sbi_trap_regs *regs, struct sbi_scratch *scratch) uptrap = sbi_hart_get_trap_info(scratch); if ((regs->mstatus & MSTATUS_MPRV) && uptrap) { rc = 0; - regs->mepc += uptrap->ilen; + regs->mepc += 4; uptrap->cause = mcause; uptrap->tval = mtval; } else { |