blob: ed690c49ef93fae344aeaec993c939e336460283 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ASM_ARM_MODULE_H
2#define _ASM_ARM_MODULE_H
3
David Howells786d35d2012-09-28 14:31:03 +09304#include <asm-generic/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Catalin Marinas2e1926e2009-02-11 13:09:54 +01006struct unwind_table;
7
Catalin Marinas2e1926e2009-02-11 13:09:54 +01008#ifdef CONFIG_ARM_UNWIND
Phil Carmodye5f77722010-08-19 15:16:37 +01009enum {
10 ARM_SEC_INIT,
11 ARM_SEC_DEVINIT,
12 ARM_SEC_CORE,
Phil Carmody09e56a22010-08-19 15:19:04 +010013 ARM_SEC_EXIT,
14 ARM_SEC_DEVEXIT,
Douglas Anderson849b8822013-08-29 00:08:01 +010015 ARM_SEC_HOT,
16 ARM_SEC_UNLIKELY,
Phil Carmodye5f77722010-08-19 15:16:37 +010017 ARM_SEC_MAX,
18};
Catalin Marinas2e1926e2009-02-11 13:09:54 +010019
Russell King89313602010-11-12 13:02:46 +000020struct mod_arch_specific {
Russell King89313602010-11-12 13:02:46 +000021 struct unwind_table *unwind[ARM_SEC_MAX];
Russell King89313602010-11-12 13:02:46 +000022};
David Howells786d35d2012-09-28 14:31:03 +093023#endif
Russell King89313602010-11-12 13:02:46 +000024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025/*
Russell Kingdc21af92011-01-04 19:09:43 +000026 * Add the ARM architecture version to the version magic string
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 */
Russell Kingdc21af92011-01-04 19:09:43 +000028#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
29
30/* Add __virt_to_phys patching state as well */
31#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
32#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
33#else
34#define MODULE_ARCH_VERMAGIC_P2V ""
35#endif
36
Dave Martin80f0aad2011-02-25 17:54:52 +010037/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
38#ifdef CONFIG_THUMB2_KERNEL
39#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
40#else
41#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
42#endif
43
Russell Kingdc21af92011-01-04 19:09:43 +000044#define MODULE_ARCH_VERMAGIC \
45 MODULE_ARCH_VERMAGIC_ARMVSN \
Dave Martin80f0aad2011-02-25 17:54:52 +010046 MODULE_ARCH_VERMAGIC_ARMTHUMB \
Russell Kingdc21af92011-01-04 19:09:43 +000047 MODULE_ARCH_VERMAGIC_P2V
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
49#endif /* _ASM_ARM_MODULE_H */