arm64: add Cortex-A53 cache errata workaround
[deliverable/linux.git] / arch / arm64 / include / asm / alternative-asm.h
index 5ee9340459b8c3c5c9e2e199eff87d4076645a19..919a67855b63233b52ed637b63596d623dba6b4f 100644 (file)
        .byte \alt_len
 .endm
 
+.macro alternative_insn insn1 insn2 cap
+661:   \insn1
+662:   .pushsection .altinstructions, "a"
+       altinstruction_entry 661b, 663f, \cap, 662b-661b, 664f-663f
+       .popsection
+       .pushsection .altinstr_replacement, "ax"
+663:   \insn2
+664:   .popsection
+       .if ((664b-663b) != (662b-661b))
+               .error "Alternatives instruction length mismatch"
+       .endif
+.endm
+
 #endif  /*  __ASSEMBLY__  */
 
 #endif /* __ASM_ALTERNATIVE_ASM_H */
This page took 0.027277 seconds and 5 git commands to generate.