Allow platform to handle load/store faults
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest7 patches 0 repliesNew
- v36 patches 0 repliesSuperseded
- v23 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 0 replies | Superseded |
Changes in v4 from the cover letter
- Addressed comments from Anup -- sbi_trap related details should not be visable to platform code.
- Minor fixes -- splitting patches and renames suggested by Anup.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | lib: sbi: rename sbi_misaligned_ldst.c to sbi_trap_ldst.clib/ lib/ | +1 | 0 replies | |
| 2/7 | include: sbi: rename sbi_misaligned_ldst.h to sbi_trap_ldst.hinclude/ lib/ lib/ | +4 | 0 replies | |
| 3/7 | lib: sbi: change prototype of sbi_trap_redirectinclude/ lib/ | +2 | 0 replies | |
| 4/7 | lib: sbi: change prototype of sbi_misaligned_load/store_handlerinclude/ lib/ lib/ | +35 | 1 reply | |
| 5/7 | lib: sbi: abstract out insn decoding to unify mem fault handlersinclude/ lib/ lib/ | +132 | 1 reply | |
| 6/7 | include: sbi: add emulate_load/store handler to platform opsinclude/ | +8 | 1 reply | |
| 7/7 | lib: sbi: call platform load/store emulatorsinclude/ lib/ | +80 | 1 reply |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Anup Patel |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b |
| 4/7 | R-b |
| 5/7 | R-b |
| 6/7 | R-b |
| 7/7 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/7] Allow platform to handle load/store faults
Sometimes a platform wants to trap-n-emulate special devices or filter access to physical devices. This patch makes sbi_trap_handler to call platform_ops.emulate_load/store and ask platform to fixup the fault.
v4 changes:
- Addressed comments from Anup -- sbi_trap related details should not be visable to platform code.
- Minor fixes -- splitting patches and renames suggested by Anup.
v3 changes:
- Addressed comments from Anup by breaking down the patchset and new sbi_platform_emulate_load/store helper functions.
- Reworked the return value of sbi_trap_ld/st_emulator to support (>0) successful emulation (==0) trap_redirect (<0) real failure.
v2 changes:
- Added const qualifier to *orig_trap on load/store fault handlers. That addressed Xiang W's comment.
- Applied clang-format to changed lines.
Bo Gan (7):
lib: sbi: rename sbi_misaligned_ldst.c to sbi_trap_ldst.c
include: sbi: rename sbi_misaligned_ldst.h to sbi_trap_ldst.h
lib: sbi: change prototype of sbi_trap_redirect
lib: sbi: change prototype of sbi_misaligned_load/store_handler
lib: sbi: abstract out insn decoding to unify mem fault handlers
include: sbi: add emulate_load/store handler to platform ops
lib: sbi: call platform load/store emulators
include/sbi/sbi_misaligned_ldst.h | 23 ---
include/sbi/sbi_platform.h | 53 +++++
include/sbi/sbi_trap.h | 2 +-
include/sbi/sbi_trap_ldst.h | 35 ++++
lib/sbi/objects.mk | 2 +-
lib/sbi/sbi_trap.c | 38 ++--
lib/sbi/{sbi_misaligned_ldst.c => sbi_trap_ldst.c} | 213 +++++++++++++++------
7 files changed, 265 insertions(+), 101 deletions(-)
delete mode 100644 include/sbi/sbi_misaligned_ldst.h
create mode 100644 include/sbi/sbi_trap_ldst.h
rename lib/sbi/{sbi_misaligned_ldst.c => sbi_trap_ldst.c} (54%)Signature · 1 line
2.7.4