summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/asm.h
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2025-10-15 15:56:00 -0700
committerPaul Walmsley <pjw@kernel.org>2025-10-17 22:00:29 -0600
commit768e054de01bef8701c24ec49309e57e0167af44 (patch)
treefaebda37fbfd0fe69312f96240f96261bcfce8cc /arch/riscv/include/asm/asm.h
parent5898fc01ff344075e4332aa9abeb0841c85e7e51 (diff)
riscv: Remove the PER_CPU_OFFSET_SHIFT macro
__per_cpu_offset is an array of unsigned long, so we can reuse the existing RISCV_LGPTR macro. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20251015225604.3860409-1-samuel.holland@sifive.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'arch/riscv/include/asm/asm.h')
-rw-r--r--arch/riscv/include/asm/asm.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/riscv/include/asm/asm.h b/arch/riscv/include/asm/asm.h
index 8bd2a11382a3..ac28066bb564 100644
--- a/arch/riscv/include/asm/asm.h
+++ b/arch/riscv/include/asm/asm.h
@@ -84,15 +84,9 @@
.endm
#ifdef CONFIG_SMP
-#ifdef CONFIG_32BIT
-#define PER_CPU_OFFSET_SHIFT 2
-#else
-#define PER_CPU_OFFSET_SHIFT 3
-#endif
-
.macro asm_per_cpu dst sym tmp
lw \tmp, TASK_TI_CPU_NUM(tp)
- slli \tmp, \tmp, PER_CPU_OFFSET_SHIFT
+ slli \tmp, \tmp, RISCV_LGPTR
la \dst, __per_cpu_offset
add \dst, \dst, \tmp
REG_L \tmp, 0(\dst)