diff options
| author | Bo Gan <ganboing@gmail.com> | 2026-06-08 23:00:22 -0700 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-06-17 11:37:19 +0530 |
| commit | 1475f147f646f337c85599b03bd3185fe591da39 (patch) | |
| tree | 8ed036858c0a3314cfdd6477894a213530859c8f /include | |
| parent | 4120e6dce250b3fcec44394dca528ee1f39f35ba (diff) | |
| download | opensbi-1475f147f646f337c85599b03bd3185fe591da39.tar.gz opensbi-1475f147f646f337c85599b03bd3185fe591da39.zip | |
lib: sbi: Rework and split sbi_misaligned(_v)_tinst_fixup
The load/store address offset between the uptrap and the orig_trap
can be derived by orig_trap->tval - uptrap->tval, thus refactor
the function prototype for simplicity.
For vector load, sbi_misaligned_v_tinst_fixup is introduced. There's
no transformed instruction for vector load/store, so null out tinst
if the fault is not a guest-page fault.
Signed-off-by: Bo Gan <ganboing@gmail.com>
Tested-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260609060024.706-3-ganboing@gmail.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_trap_ldst.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/include/sbi/sbi_trap_ldst.h b/include/sbi/sbi_trap_ldst.h index 33c348c5..30228d24 100644 --- a/include/sbi/sbi_trap_ldst.h +++ b/include/sbi/sbi_trap_ldst.h @@ -28,9 +28,6 @@ int sbi_load_access_handler(struct sbi_trap_context *tcntx); int sbi_store_access_handler(struct sbi_trap_context *tcntx); -ulong sbi_misaligned_tinst_fixup(ulong orig_tinst, ulong new_tinst, - ulong addr_offset); - int sbi_misaligned_v_ld_emulator(ulong insn, struct sbi_trap_context *tcntx); |
