arm64: use alternative auto-nop
[linux-2.6-block.git] / arch / arm64 / lib / copy_page.S
index 4c1e700840b6ced5a0b2f868bfb4f37dddc8abc0..c3cd65e3181414bcaf3ec5b50937f95bf895570b 100644 (file)
  *     x1 - src
  */
 ENTRY(copy_page)
-alternative_if_not ARM64_HAS_NO_HW_PREFETCH
-       nop
-       nop
-alternative_else
+alternative_if ARM64_HAS_NO_HW_PREFETCH
        # Prefetch two cache lines ahead.
        prfm    pldl1strm, [x1, #128]
        prfm    pldl1strm, [x1, #256]
-alternative_endif
+alternative_else_nop_endif
 
        ldp     x2, x3, [x1]
        ldp     x4, x5, [x1, #16]
@@ -52,11 +49,9 @@ alternative_endif
 1:
        subs    x18, x18, #128
 
-alternative_if_not ARM64_HAS_NO_HW_PREFETCH
-       nop
-alternative_else
+alternative_if ARM64_HAS_NO_HW_PREFETCH
        prfm    pldl1strm, [x1, #384]
-alternative_endif
+alternative_else_nop_endif
 
        stnp    x2, x3, [x0]
        ldp     x2, x3, [x1]