public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [S390] EX_TABLE macro.
@ 2006-08-30 12:43 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-08-30 12:43 UTC (permalink / raw)
  To: linux-kernel

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

[S390] EX_TABLE macro.

Add EX_TABLE helper macro to simplify creation of inline assembly
exception table entries.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 include/asm-s390/processor.h |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)

diff -urpN linux-2.6/include/asm-s390/processor.h linux-2.6-patched/include/asm-s390/processor.h
--- linux-2.6/include/asm-s390/processor.h	2006-08-30 14:24:22.000000000 +0200
+++ linux-2.6-patched/include/asm-s390/processor.h	2006-08-30 14:24:36.000000000 +0200
@@ -339,4 +339,21 @@ int unregister_idle_notifier(struct noti
 
 #endif
 
+/*
+ * Helper macro for exception table entries
+ */
+#ifndef __s390x__
+#define EX_TABLE(_fault,_target)			\
+	".section __ex_table,\"a\"\n"			\
+	"	.align 4\n"				\
+	"	.long  " #_fault "," #_target "\n"	\
+	".previous\n"
+#else
+#define EX_TABLE(_fault,_target)			\
+	".section __ex_table,\"a\"\n"			\
+	"	.align 8\n"				\
+	"	.quad  " #_fault "," #_target "\n"	\
+	".previous\n"
+#endif
+
 #endif                                 /* __ASM_S390_PROCESSOR_H           */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-30 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-30 12:43 [S390] EX_TABLE macro Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox