[PW_SID:1119395] riscv: improve percpu helpers and PIO mapping#2181
[PW_SID:1119395] riscv: improve percpu helpers and PIO mapping#2181linux-riscv-bot wants to merge 4 commits into
Conversation
RISC-V implements its own string I/O helpers so port I/O can use the architecture-specific ordering rules. These helpers build an I/O address from PCI_IOBASE and the port number before calling the raw accessors. When port I/O is not supported, exposing the port-string helpers is both unnecessary and can make clang diagnose null-pointer arithmetic from the PCI_IOBASE based address expression. Keep the MMIO string helpers available as before, but only provide the port I/O variants when CONFIG_HAS_IOPORT is enabled. Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Add RISC-V specific this_cpu helpers so common percpu operations can use short architecture sequences instead of the generic implementation. Native-width operations use AMOs, while 8/16-bit operations use Zabha when available and a local 32-bit LR/SC fallback otherwise. Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
RISC-V percpu addressing currently derives the base offset from the CPU number and __per_cpu_offset[]. Cache the current CPU percpu offset in thread_info so percpu accesses can load it directly. Keep the cached value up to date for the boot CPU, context switches and secondary CPU bringup. Initialize secondary idle tasks before they start running so early percpu accesses use the secondary CPU offset rather than inheriting the boot CPU value. Link: https://lists.riscv.org/g/tech-privileged/topic/risc_v_tech_arch_review/113437553?page=2 Signed-off-by: Yunhui Cui <cuiyunhui@bytedance.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v5,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v5,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v5,3/3] riscv: store percpu offset into thread_info" |
a50938c to
40ba5ca
Compare
PR for series 1119395 applied to workflow__riscv__fixes
Name: riscv: improve percpu helpers and PIO mapping
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1119395
Version: 5