summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/vermagic.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-27 10:32:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-27 10:32:30 +0300
commitf6402eb4a2b3192bdf23fa39ef8e85fd3691cca9 (patch)
treeda8d55cd97d59cfe689fe447d98637204f2218e3 /arch/arm/include/asm/vermagic.h
parent992a60ed0d5e312ce9a485c9e12097ac82ae4b3e (diff)
parent6a8b55ed4056ea5559ebe4f6a4b247f627870d4c (diff)
downloadlinux-f6402eb4a2b3192bdf23fa39ef8e85fd3691cca9.tar.xz
Merge 5.7-rc3 into usb-next
We need the USB fixes in here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/include/asm/vermagic.h')
-rw-r--r--arch/arm/include/asm/vermagic.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/include/asm/vermagic.h b/arch/arm/include/asm/vermagic.h
new file mode 100644
index 000000000000..62ce94e26a63
--- /dev/null
+++ b/arch/arm/include/asm/vermagic.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_VERMAGIC_H
+#define _ASM_VERMAGIC_H
+
+#include <linux/stringify.h>
+
+/*
+ * Add the ARM architecture version to the version magic string
+ */
+#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
+
+/* Add __virt_to_phys patching state as well */
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
+#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
+#else
+#define MODULE_ARCH_VERMAGIC_P2V ""
+#endif
+
+/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
+#ifdef CONFIG_THUMB2_KERNEL
+#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
+#else
+#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
+#endif
+
+#define MODULE_ARCH_VERMAGIC \
+ MODULE_ARCH_VERMAGIC_ARMVSN \
+ MODULE_ARCH_VERMAGIC_ARMTHUMB \
+ MODULE_ARCH_VERMAGIC_P2V
+
+#endif /* _ASM_VERMAGIC_H */