linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] Add NMI Support to RISC-V via SSE
@ 2025-11-27 12:52 Yunhui Cui
  2025-11-27 12:52 ` [PATCH v3 1/8] drivers: firmware: riscv: add SSE NMI support Yunhui Cui
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Yunhui Cui @ 2025-11-27 12:52 UTC (permalink / raw)
  To: conor, paul.walmsley, palmer, aou, alex, cuiyunhui, luxu.kernel,
	linux-kernel, linux-riscv, jassisinghbrar, conor.dooley,
	valentina.fernandezalanis, catalin.marinas, will, maz,
	timothy.hayes, lpieralisi, arnd, kees, tglx, viresh.kumar,
	boqun.feng, linux-arm-kernel, cleger, atishp, ajones

This patchset is based on SSE[1]. It adds support for inter CPU NMI
interfaces, enabling operations such as CPU stopping, backtrace, and
kgdb to be performed via NMI which is a more robust approach compared
to IPI. In addition to inter CPU NMIs, it also adds support for unknown
NMI[2].

v1->v2: Utilized SBI_SSE_EVENT_LOCAL_SOFTWARE_INJECTED for inter
CPU NMI communication.

v2->v3:
1. Since CPU stop is not a high frequency operation, NMI is directly
used instead of IPI, without first attempting IPI and using NMI as
a fallback.

2. The parameter local_nmi_arg used by sse_event_register cannot represent
local NMI types (Crash, Stop, Backtrace, Kgdb) for multiple CPUs, so a new
per CPU variable local_nmi has been added to address this.

[1] https://lore.kernel.org/all/20251105082639.342973-1-cleger@rivosinc.com/
[2] https://github.com/riscv-non-isa/riscv-sbi-doc/pull/223

Yunhui Cui (8):
  drivers: firmware: riscv: add SSE NMI support
  riscv: smp: move ipi_cpu_crash_stop() declaration to smp.h
  smp: move num_other_online_cpus() into smp.h
  riscv: smp: use NMI for crash stop
  riscv: smp: use NMI for CPU stop
  riscv: smp: use NMI for backtrace
  riscv: smp: kgdb: use NMI for CPU roundup
  drivers: firmware: riscv: add unknown nmi support

 MAINTAINERS                            |   8 ++
 arch/arm64/kernel/smp.c                |  11 --
 arch/riscv/include/asm/sbi.h           |   1 +
 arch/riscv/include/asm/smp.h           |  11 ++
 arch/riscv/kernel/smp.c                |  58 ++++----
 drivers/firmware/riscv/Kconfig         |  10 ++
 drivers/firmware/riscv/Makefile        |   1 +
 drivers/firmware/riscv/riscv_sse_nmi.c | 175 +++++++++++++++++++++++++
 include/linux/riscv_sse_nmi.h          |  26 ++++
 include/linux/smp.h                    |  11 ++
 10 files changed, 277 insertions(+), 35 deletions(-)
 create mode 100644 drivers/firmware/riscv/riscv_sse_nmi.c
 create mode 100644 include/linux/riscv_sse_nmi.h

-- 
2.39.5



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-12-12  3:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27 12:52 [PATCH v3 0/8] Add NMI Support to RISC-V via SSE Yunhui Cui
2025-11-27 12:52 ` [PATCH v3 1/8] drivers: firmware: riscv: add SSE NMI support Yunhui Cui
2025-11-27 12:52 ` [PATCH v3 2/8] riscv: smp: move ipi_cpu_crash_stop() declaration to smp.h Yunhui Cui
2025-11-27 12:53 ` [PATCH v3 3/8] smp: move num_other_online_cpus() into smp.h Yunhui Cui
2025-11-27 12:53 ` [PATCH v3 4/8] riscv: smp: use NMI for crash stop Yunhui Cui
2025-11-27 12:53 ` [PATCH v3 5/8] riscv: smp: use NMI for CPU stop Yunhui Cui
2025-12-04  4:07   ` Radim Krčmář
2025-12-04  5:28     ` [External] " yunhui cui
2025-12-04 13:16       ` Radim Krčmář
2025-12-08 11:40         ` yunhui cui
2025-12-10 14:22           ` Radim Krčmář
2025-12-12  3:09             ` yunhui cui
2025-11-27 12:53 ` [PATCH v3 6/8] riscv: smp: use NMI for backtrace Yunhui Cui
2025-11-27 12:53 ` [PATCH v3 7/8] riscv: smp: kgdb: use NMI for CPU roundup Yunhui Cui
2025-11-27 12:53 ` [PATCH v3 8/8] drivers: firmware: riscv: add unknown nmi support Yunhui Cui
2025-12-04  4:11   ` Radim Krčmář
2025-12-04  5:18     ` [External] " yunhui cui
2025-12-04 13:26       ` Radim Krčmář

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).