[PW_SID:1120193] riscv: fix PIO helpers and add optimized percpu ops#2198
[PW_SID:1120193] riscv: fix PIO helpers and add optimized percpu ops#2198linux-riscv-bot wants to merge 3 commits into
Conversation
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: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v7,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v7,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v7,3/3] riscv: store percpu offset into thread_info" |
PR for series 1120193 applied to workflow__riscv__fixes
Name: riscv: fix PIO helpers and add optimized percpu ops
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1120193
Version: 7