summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/alternative-asm.h
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2014-11-14 16:54:08 +0100
committerWill Deacon <will.deacon@arm.com>2014-11-25 14:46:36 +0100
commite039ee4ee3fcf174736f2cb0a2eed6cb908348a6 (patch)
tree65cb1ee1f7ad18726189954a4fd4d0f64420838a /arch/arm64/include/asm/alternative-asm.h
parentarm64: add cpu_capabilities bitmap (diff)
downloadlinux-e039ee4ee3fcf174736f2cb0a2eed6cb908348a6.tar.xz
linux-e039ee4ee3fcf174736f2cb0a2eed6cb908348a6.zip
arm64: add alternative runtime patching
With a blatant copy of some x86 bits we introduce the alternative runtime patching "framework" to arm64. This is quite basic for now and we only provide the functions we need at this time. This is connected to the newly introduced feature bits. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/alternative-asm.h')
-rw-r--r--arch/arm64/include/asm/alternative-asm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/alternative-asm.h b/arch/arm64/include/asm/alternative-asm.h
new file mode 100644
index 000000000000..5ee9340459b8
--- /dev/null
+++ b/arch/arm64/include/asm/alternative-asm.h
@@ -0,0 +1,16 @@
+#ifndef __ASM_ALTERNATIVE_ASM_H
+#define __ASM_ALTERNATIVE_ASM_H
+
+#ifdef __ASSEMBLY__
+
+.macro altinstruction_entry orig_offset alt_offset feature orig_len alt_len
+ .word \orig_offset - .
+ .word \alt_offset - .
+ .hword \feature
+ .byte \orig_len
+ .byte \alt_len
+.endm
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* __ASM_ALTERNATIVE_ASM_H */