Merge patch "riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y"
[platform/kernel/linux-starfive.git] / arch / riscv / include / asm / vdso / processor.h
index 789bdb8..14f5d27 100644 (file)
@@ -13,11 +13,12 @@ static inline void cpu_relax(void)
        /* In lieu of a halt instruction, induce a long-latency stall. */
        __asm__ __volatile__ ("div %0, %0, zero" : "=r" (dummy));
 #endif
+
+#ifdef __riscv_zihintpause
        /*
         * Reduce instruction retirement.
         * This assumes the PC changes.
         */
-#ifdef __riscv_zihintpause
        __asm__ __volatile__ ("pause");
 #else
        /* Encoding of the pause instruction */