[PATCH v6 0/3] riscv: fix PIO helpers and add optimized percpu ops
Yunhui Cui
cuiyunhui at bytedance.com
Wed Jul 1 05:29:45 PDT 2026
Changes in v6:
- Drop the extra PCI_IO_ADDR() helper; directly guard the RISC-V ins*/outs*
helpers with CONFIG_HAS_IOPORT.
- Add the missing <asm/cmpxchg.h> include to arch/riscv/include/asm/percpu.h
so cmpxchg_relaxed() and system_has_cmpxchg128() are visible.
- Clean up the two 8/16-bit LR/SC fallback asm blocks to use consistent
old/new/field variable names.
Yunhui Cui (3):
riscv: io: avoid null-pointer arithmetic in PIO helpers
riscv: introduce percpu.h into include/asm
riscv: store percpu offset into thread_info
arch/riscv/include/asm/asm.h | 6 +-
arch/riscv/include/asm/io.h | 8 +
arch/riscv/include/asm/percpu.h | 288 +++++++++++++++++++++++++++
arch/riscv/include/asm/switch_to.h | 8 +
arch/riscv/include/asm/thread_info.h | 3 +-
arch/riscv/kernel/asm-offsets.c | 1 +
arch/riscv/kernel/smpboot.c | 8 +
arch/riscv/net/bpf_jit_comp64.c | 9 +-
8 files changed, 317 insertions(+), 14 deletions(-)
create mode 100644 arch/riscv/include/asm/percpu.h
--
2.39.5
More information about the linux-riscv
mailing list