FROMLIST: arm64: Factor out TTBR0_EL1 post-update workaround into a specific asm...
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / include / asm / assembler.h
index 9e8ac1e73457f4ec8e92deacec7bb48f14e91331..9d3e77a5cf07546fbd024c2f21615ea4a20f0880 100644 (file)
@@ -362,4 +362,21 @@ alternative_endif
        movk    \reg, :abs_g0_nc:\val
        .endm
 
+/*
+ * Errata workaround post TTBR0_EL1 update.
+ */
+       .macro  post_ttbr0_update_workaround
+#ifdef CONFIG_CAVIUM_ERRATUM_27456
+alternative_if_not ARM64_WORKAROUND_CAVIUM_27456
+       nop
+       nop
+       nop
+alternative_else
+       ic      iallu
+       dsb     nsh
+       isb
+alternative_endif
+#endif
+       .endm
+
 #endif /* __ASM_ASSEMBLER_H */