xref: /openbmc/linux/arch/arm/include/asm/vermagic.h (revision d2f4a190)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_VERMAGIC_H
3 #define _ASM_VERMAGIC_H
4 
5 #include <linux/stringify.h>
6 
7 /*
8  * Add the ARM architecture version to the version magic string
9  */
10 #define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
11 
12 /* Add __virt_to_phys patching state as well */
13 #ifdef CONFIG_ARM_PATCH_PHYS_VIRT
14 #define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
15 #else
16 #define MODULE_ARCH_VERMAGIC_P2V ""
17 #endif
18 
19 /* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
20 #ifdef CONFIG_THUMB2_KERNEL
21 #define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
22 #else
23 #define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
24 #endif
25 
26 #define MODULE_ARCH_VERMAGIC \
27 	MODULE_ARCH_VERMAGIC_ARMVSN \
28 	MODULE_ARCH_VERMAGIC_ARMTHUMB \
29 	MODULE_ARCH_VERMAGIC_P2V
30 
31 #endif /* _ASM_VERMAGIC_H */
32