]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
riscv: Using TOOLCHAIN_HAS_ZIHINTPAUSE marco replace zihintpause
authorMinda Chen <minda.chen@starfivetech.com>
Wed, 2 Aug 2023 06:42:15 +0000 (14:42 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 1 Nov 2023 02:15:54 +0000 (19:15 -0700)
Actually it is a part of Conor's
commit aae538cd03bc ("riscv: fix detection of toolchain
Zihintpause support").
It is looks like a merge issue. Samuel's
commit 0b1d60d6dd9e ("riscv: Fix build with
CONFIG_CC_OPTIMIZE_FOR_SIZE=y") do not base on Conor's commit and
revert to __riscv_zihintpause. So this patch can fix it.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Fixes: 3c349eacc559 ("Merge patch "riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y"")
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230802064215.31111-1-minda.chen@starfivetech.com
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/vdso/processor.h

index 14f5d27783b85811a4f7e6e1d43c9b5ee9aca5a1..96b65a5396dfcfc8f60fab06e7e0cd1972e0271e 100644 (file)
@@ -14,7 +14,7 @@ static inline void cpu_relax(void)
        __asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
 #endif
 
-#ifdef __riscv_zihintpause
+#ifdef CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE
        /*
         * Reduce instruction retirement.
         * This assumes the PC changes.