aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/linkage.h
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2015-06-12 10:57:40 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-07-22 09:57:59 +0200
commit2e54dc3c7dadd4d012f132b1a2b3ab89d9a48cc2 (patch)
treee7984dbe43e250f95c0a1fbea581fa65b0a4c6b4 /arch/s390/include/asm/linkage.h
parent3827ec3d8fd51aef8352b0282b14f0f3ab615930 (diff)
s390/kernel: move EX_TABLE macros to linkage.h header file
Move the EX_TABLE macro definitions from the processor.h to the linkage.h header file. It helps to reduce circular header file dependencies. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/linkage.h')
-rw-r--r--arch/s390/include/asm/linkage.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/s390/include/asm/linkage.h b/arch/s390/include/asm/linkage.h
index fc8a8284778e..27da78cf416d 100644
--- a/arch/s390/include/asm/linkage.h
+++ b/arch/s390/include/asm/linkage.h
@@ -6,4 +6,26 @@
#define __ALIGN .align 4, 0x07
#define __ALIGN_STR __stringify(__ALIGN)
+#ifndef __ASSEMBLY__
+
+/*
+ * Helper macro for exception table entries
+ */
+#define EX_TABLE(_fault, _target) \
+ ".section __ex_table,\"a\"\n" \
+ ".align 4\n" \
+ ".long (" #_fault ") - .\n" \
+ ".long (" #_target ") - .\n" \
+ ".previous\n"
+
+#else /* __ASSEMBLY__ */
+
+#define EX_TABLE(_fault, _target) \
+ .section __ex_table,"a" ; \
+ .align 4 ; \
+ .long (_fault) - . ; \
+ .long (_target) - . ; \
+ .previous
+
+#endif /* __ASSEMBLY__ */
#endif

Privacy Policy