riscv: improve percpu helpers and PIO mapping
| From: | Yunhui Cui <cuiyunhui-AT-bytedance.com> | |
| To: | pjw-AT-kernel.org, palmer-AT-dabbelt.com, aou-AT-eecs.berkeley.edu, alex-AT-ghiti.fr, dennis-AT-kernel.org, tj-AT-kernel.org, cl-AT-gentwo.org, ast-AT-kernel.org, daniel-AT-iogearbox.net, andrii-AT-kernel.org, martin.lau-AT-linux.dev, eddyz87-AT-gmail.com, memxor-AT-gmail.com, song-AT-kernel.org, yonghong.song-AT-linux.dev, jolsa-AT-kernel.org, bjorn-AT-kernel.org, pulehui-AT-huawei.com, puranjay-AT-kernel.org, thuth-AT-redhat.com, ajones-AT-ventanamicro.com, ben.dooks-AT-codethink.co.uk, rkrcmar-AT-ventanamicro.com, cuiyunhui-AT-bytedance.com, samuel.holland-AT-sifive.com, zong.li-AT-sifive.com, conor.dooley-AT-microchip.com, tglx-AT-kernel.org, debug-AT-rivosinc.com, seanwascoding-AT-gmail.com, andybnac-AT-gmail.com, menglong8.dong-AT-gmail.com, cyrilbur-AT-tenstorrent.com, wangruikang-AT-iscas.ac.cn, atishp-AT-rivosinc.com, apatel-AT-ventanamicro.com, linux-riscv-AT-lists.infradead.org, linux-kernel-AT-vger.kernel.org, linux-mm-AT-kvack.org, bpf-AT-vger.kernel.org, arnd-AT-arndb.de, nathan-AT-kernel.org, nick.desaulniers+lkml-AT-gmail.com, morbo-AT-google.com, justinstitt-AT-google.com, qingfang.deng-AT-siflower.com.cn, linux-arch-AT-vger.kernel.org, llvm-AT-lists.linux.dev | |
| Subject: | [PATCH v5 0/3] riscv: improve percpu helpers and PIO mapping | |
| Date: | Wed, 01 Jul 2026 12:20:38 +0800 | |
| Message-ID: | <cover.1782877663.git.cuiyunhui@bytedance.com> | |
| Archive-link: | Article |
Changes in v5: - Keep the PIO helper fix local to RISC-V: drop the generic HAS_IOPORT_MAP dependency change and the generic ioport_map() change from v4. - Add the missing linux/bits.h include for GENMASK and BITS_PER_BYTE. - Fix the 8/16-bit LR/SC fallback to mask subword results before writing them back. - Use early-clobber constraints in the 8/16-bit add_return LR/SC fallback. - Fix this_cpu_and_4/8 to pass the intended operand to RISC-V amoand. - Initialize the secondary idle task pcpu_offset before starting the CPU. 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 | 26 ++- arch/riscv/include/asm/percpu.h | 287 +++++++++++++++++++++++++++ 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, 326 insertions(+), 22 deletions(-) create mode 100644 arch/riscv/include/asm/percpu.h -- 2.39.5
