Skip to content

riscv: add hardware error trap handler support#271

Open
GooTal wants to merge 1 commit into
RVCK-Project:rvck-6.6from
zte-riscv:pr-Add-hw-trap-handler
Open

riscv: add hardware error trap handler support#271
GooTal wants to merge 1 commit into
RVCK-Project:rvck-6.6from
zte-riscv:pr-Add-hw-trap-handler

Conversation

@GooTal
Copy link
Copy Markdown

@GooTal GooTal commented May 13, 2026

riscv: add hardware error trap handler support
community inclusion
category: feature
bugzilla: #269
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260413&id=5d5c5d0f2be9cf0351ad8e90516c519a8db22981


Add support for handling hardware error traps (exception code 19)
in the RISC-V architecture. The changes include:

  • Add do_trap_hardware_error function declaration in asm-prototypes.h
  • Add hardware error trap vector entry in entry.S exception vector table
  • Implement do_trap_hardware_error handler in traps.c that generates
    SIGBUS with BUS_MCEERR_AR for hardware errors

This enables proper handling of hardware error exceptions that may occur
in RISC-V systems, providing appropriate error reporting and signal
generation for user space processes.

Signed-off-by: Rui Qi qirui.001@bytedance.com
Link: https://patch.msgid.link/20260202094200.53735-1-qirui.001@bytedance.com
[pjw@kernel.org: clean up commit message slightly]
Signed-off-by: Paul Walmsley pjw@kernel.org
Signed-off-by: Lu Peng lu.peng3@zte.com.cn
Signed-off-by: liuqingtao liu.qingtao2@zte.com.cn

community inclusion
category: feature
bugzilla: RVCK-Project#269
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20260413&id=5d5c5d0f2be9cf0351ad8e90516c519a8db22981

---------------------------

Add support for handling hardware error traps (exception code 19)
in the RISC-V architecture. The changes include:

- Add do_trap_hardware_error function declaration in asm-prototypes.h
- Add hardware error trap vector entry in entry.S exception vector table
- Implement do_trap_hardware_error handler in traps.c that generates
  SIGBUS with BUS_MCEERR_AR for hardware errors

This enables proper handling of hardware error exceptions that may occur
in RISC-V systems, providing appropriate error reporting and signal
generation for user space processes.

Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Link: https://patch.msgid.link/20260202094200.53735-1-qirui.001@bytedance.com
[pjw@kernel.org: clean up commit message slightly]
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Signed-off-by: Lu Peng <lu.peng3@zte.com.cn>
Signed-off-by: liuqingtao <liu.qingtao2@zte.com.cn>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026


开始测试 log: https://github.com/RVCK-Project/rvck/actions/runs/25775109944

参数解析结果
args value
repository RVCK-Project/rvck
head ref pull/271/head
base ref rvck-6.6
LAVA repo RVCK-Project/lavaci
LAVA hardware
LAVA Testcase path
need run job kunit-test,kernel-build,check-patch,lava-trigger

测试完成

详细结果:
check result
kunit-test success
kernel-build success
check-patch success
lava-trigger-qemu skipped
lava-trigger-sg2042 skipped
lava-trigger-k1 skipped
lava-trigger-lpi4a skipped

Kunit Test Result

[02:51:05] Testing complete. Ran 457 tests: passed: 445, skipped: 12

Kernel Build Result

Check Patch Result

Total Errors 0
Total Warnings 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants