blob: 0d3a28dbc8e5db05823e6b83f85ccc5d04b807ac [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,
Phil Carmodye5f77722010-08-19 15:16:37 +010015 ARM_SEC_MAX,
16};
Catalin Marinas2e1926e2009-02-11 13:09:54 +010017
Russell King89313602010-11-12 13:02:46 +000018struct mod_arch_specific {
Russell King89313602010-11-12 13:02:46 +000019 struct unwind_table *unwind[ARM_SEC_MAX];
Russell King89313602010-11-12 13:02:46 +000020};
David Howells786d35d2012-09-28 14:31:03 +093021#endif
Russell King89313602010-11-12 13:02:46 +000022
Linus Torvalds1da177e2005-04-16 15:20:36 -070023/*
Russell Kingdc21af92011-01-04 19:09:43 +000024 * Add the ARM architecture version to the version magic string
Linus Torvalds1da177e2005-04-16 15:20:36 -070025 */
Russell Kingdc21af92011-01-04 19:09:43 +000026#define MODULE_ARCH_VERMAGIC_ARMVSN "ARMv" __stringify(__LINUX_ARM_ARCH__) " "
27
28/* Add __virt_to_phys patching state as well */
29#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
30#define MODULE_ARCH_VERMAGIC_P2V "p2v8 "
31#else
32#define MODULE_ARCH_VERMAGIC_P2V ""
33#endif
34
Dave Martin80f0aad2011-02-25 17:54:52 +010035/* Add instruction set architecture tag to distinguish ARM/Thumb kernels */
36#ifdef CONFIG_THUMB2_KERNEL
37#define MODULE_ARCH_VERMAGIC_ARMTHUMB "thumb2 "
38#else
39#define MODULE_ARCH_VERMAGIC_ARMTHUMB ""
40#endif
41
Russell Kingdc21af92011-01-04 19:09:43 +000042#define MODULE_ARCH_VERMAGIC \
43 MODULE_ARCH_VERMAGIC_ARMVSN \
Dave Martin80f0aad2011-02-25 17:54:52 +010044 MODULE_ARCH_VERMAGIC_ARMTHUMB \
Russell Kingdc21af92011-01-04 19:09:43 +000045 MODULE_ARCH_VERMAGIC_P2V
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47#endif /* _ASM_ARM_MODULE_H */