Skip to content

Commit 768e054

Browse files
SiFiveHollandPaul Walmsley
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paul Walmsley <[email protected]>
1 parent 5898fc0 commit 768e054

File tree

1 file changed

+1
-7
lines changed
  • arch/riscv/include/asm

1 file changed

+1
-7
lines changed

arch/riscv/include/asm/asm.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,9 @@
8484
.endm
8585

8686
#ifdef CONFIG_SMP
87-
#ifdef CONFIG_32BIT
88-
#define PER_CPU_OFFSET_SHIFT 2
89-
#else
90-
#define PER_CPU_OFFSET_SHIFT 3
91-
#endif
92-
9387
.macro asm_per_cpu dst sym tmp
9488
lw \tmp, TASK_TI_CPU_NUM(tp)
95-
slli \tmp, \tmp, PER_CPU_OFFSET_SHIFT
89+
slli \tmp, \tmp, RISCV_LGPTR
9690
la \dst, __per_cpu_offset
9791
add \dst, \dst, \tmp
9892
REG_L \tmp, 0(\dst)

0 commit comments

Comments
 (0)