summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/asm-extable.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/asm-extable.h')
-rw-r--r--arch/s390/include/asm/asm-extable.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/s390/include/asm/asm-extable.h b/arch/s390/include/asm/asm-extable.h
new file mode 100644
index 000000000000..620390f17f0c
--- /dev/null
+++ b/arch/s390/include/asm/asm-extable.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_EXTABLE_H
+#define __ASM_EXTABLE_H
+
+#include <linux/stringify.h>
+#include <asm/asm-const.h>
+
+#define __EX_TABLE(_section, _fault, _target) \
+ stringify_in_c(.section _section,"a";) \
+ stringify_in_c(.align 8;) \
+ stringify_in_c(.long (_fault) - .;) \
+ stringify_in_c(.long (_target) - .;) \
+ stringify_in_c(.quad 0;) \
+ stringify_in_c(.previous)
+
+#define EX_TABLE(_fault, _target) \
+ __EX_TABLE(__ex_table, _fault, _target)
+#define EX_TABLE_AMODE31(_fault, _target) \
+ __EX_TABLE(.amode31.ex_table, _fault, _target)
+
+#endif /* __ASM_EXTABLE_H */