Merge patch "riscv: Fix build with CONFIG_CC_OPTIMIZE_FOR_SIZE=y"
[linux-block.git] / arch / riscv / include / asm / vdso / processor.h
index 789bdb8211a25604be9df9200601edc75907f806..14f5d27783b85811a4f7e6e1d43c9b5ee9aca5a1 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 */