lib: Remove scratch parameter from unpriv load/store functions

The scratch parameter of unpriv load/store functions is now redundant
hence we remove it.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
Anup Patel
2020-03-19 17:37:54 +05:30
committed by Anup Patel
parent 1de66d170e
commit 626467cfd9
5 changed files with 17 additions and 26 deletions

View File

@@ -42,7 +42,7 @@ int sbi_misaligned_load_handler(u32 hartid, ulong mcause,
* Bit[0] == 0 implies trapped instruction value is
* zero or special value.
*/
insn = sbi_get_insn(regs->mepc, scratch, &uptrap);
insn = sbi_get_insn(regs->mepc, &uptrap);
if (uptrap.cause) {
uptrap.epc = regs->mepc;
return sbi_trap_redirect(regs, &uptrap, scratch);
@@ -120,7 +120,7 @@ int sbi_misaligned_load_handler(u32 hartid, ulong mcause,
val.data_u64 = 0;
for (i = 0; i < len; i++) {
val.data_bytes[i] = sbi_load_u8((void *)(addr + i),
scratch, &uptrap);
&uptrap);
if (uptrap.cause) {
uptrap.epc = regs->mepc;
return sbi_trap_redirect(regs, &uptrap, scratch);
@@ -162,7 +162,7 @@ int sbi_misaligned_store_handler(u32 hartid, ulong mcause,
* Bit[0] == 0 implies trapped instruction value is
* zero or special value.
*/
insn = sbi_get_insn(regs->mepc, scratch, &uptrap);
insn = sbi_get_insn(regs->mepc, &uptrap);
if (uptrap.cause) {
uptrap.epc = regs->mepc;
return sbi_trap_redirect(regs, &uptrap, scratch);
@@ -230,7 +230,7 @@ int sbi_misaligned_store_handler(u32 hartid, ulong mcause,
for (i = 0; i < len; i++) {
sbi_store_u8((void *)(addr + i), val.data_bytes[i],
scratch, &uptrap);
&uptrap);
if (uptrap.cause) {
uptrap.epc = regs->mepc;
return sbi_trap_redirect(regs, &uptrap, scratch);