[PW_SID:1121150] riscv: fix PIO helpers and add optimized percpu ops#2210
[PW_SID:1121150] riscv: fix PIO helpers and add optimized percpu ops#2210linux-riscv-bot wants to merge 4 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> Reviewed-by: Arnd Bergmann <arnd@arndb.de> 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. With asm_per_cpu no longer deriving the offset from the CPU number, drop the stale TASK_TI_CPU_NUM asm offset as well. 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: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 1: "[v8,1/3] riscv: io: avoid null-pointer arithmetic in PIO helpers" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 2: "[v8,2/3] riscv: introduce percpu.h into include/asm" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
|
Patch 3: "[v8,3/3] riscv: store percpu offset into thread_info" |
2b6a725 to
da477a6
Compare
PR for series 1121150 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=1121150
Version: 8