Skip to contentSkip to conversation

cr: move CKPT_ARCH_NSIG to asm/signal.h

PATCH In review Serge E. Hallyn 2 participants 3 messages Jun 26, 2009 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cr: move CKPT_ARCH_NSIG to asm/signal.h

I dunno... does this seem worth a shot? Or should I just go ahead and #define CKPT_ARCH_NSIG in arch/s390/include/asm/checkpoint_hdr.h after all?

From c128ce9ebc0bea5801f90ba99a58fcc18b7df84f Mon Sep 17 00:00:00 2001
From: Serge E. Hallyn <serue-r/[email protected]>
Date: Fri, 26 Jun 2009 10:59:17 -0400
Subject: [PATCH 1/1] cr: move CKPT_ARCH_NSIG to asm/signal.h

Just a thought... if the signal code changes we don't want the checkpoint code getting out of sync. But putting it where it really belongs - asm/sigcontext.h - doesn't work bc that's under ifdef __KERNEL__. So does this seem like a reasonable thing to do?

Also define the value for s390.

---
 arch/s390/include/asm/signal.h        |    2 ++
 arch/x86/include/asm/checkpoint_hdr.h |    2 --
 arch/x86/include/asm/signal.h         |    1 +
 include/linux/checkpoint_hdr.h        |    1 +
 4 files changed, 4 insertions(+), 2 deletions(-)
arch/s390/include/asm/signal.h +2 -0
index f6cfddb..bcd7afa 100644
@@ -38,6 +38,8 @@ typedef unsigned long sigset_t;
 
 #endif /* __KERNEL__ */
 
+#define CKPT_ARCH_NSIG	64
+
 #define SIGHUP           1
 #define SIGINT           2
 #define SIGQUIT          3
arch/x86/include/asm/checkpoint_hdr.h +0 -2
index 745038b..16485ca 100644
@@ -44,8 +44,6 @@ enum {
 	CKPT_HDR_MM_CONTEXT_LDT,
 };
 
-#define CKPT_ARCH_NSIG  64
-
 struct ckpt_hdr_header_arch {
 	struct ckpt_hdr h;
 	/* FIXME: add HAVE_HWFP */
arch/x86/include/asm/signal.h +1 -0
index 7761a5d..de9147d 100644
@@ -40,6 +40,7 @@ typedef unsigned long sigset_t;
 #endif /* __KERNEL__ */
 #endif /* __ASSEMBLY__ */
 
+#define CKPT_ARCH_NSIG  64
 #define SIGHUP		 1
 #define SIGINT		 2
 #define SIGQUIT		 3
include/linux/checkpoint_hdr.h +1 -0
index 37bae3d..7d16664 100644
@@ -12,6 +12,7 @@
 
 #include <linux/types.h>
 #include <linux/utsname.h>
+#include <asm/signal.h> /* for CKPT_ARCH_NSIG */
 
 /*
  * To maintain compatibility between 32-bit and 64-bit architecture flavors,
Signature · 1 line
1.6.1

A message that is not in the archive (sent off-list or not yet received): 20090626153012.GA23103-r/[email protected]

#2 lore raw
Quoted 3 lines · Serge E. Hallyn

I dunno... does this seem worth a shot? Or should I just go ahead and #define CKPT_ARCH_NSIG in arch/s390/include/asm/checkpoint_hdr.h after all?

How about leaving definition in checkpoint_hdr.h, and adding somewhere a compile bug (under __KERNEL__) if there is a mismatch, i.e. if CKPT_ARCH_NSIG != _NSIG ?

Oren.

Quoted 72 lines

From c128ce9ebc0bea5801f90ba99a58fcc18b7df84f Mon Sep 17 00:00:00 2001
From: Serge E. Hallyn <serue-r/[email protected]>
Date: Fri, 26 Jun 2009 10:59:17 -0400
Subject: [PATCH 1/1] cr: move CKPT_ARCH_NSIG to asm/signal.h

Just a thought... if the signal code changes we don't want the checkpoint code getting out of sync. But putting it where it really belongs - asm/sigcontext.h - doesn't work bc that's under ifdef __KERNEL__. So does this seem like a reasonable thing to do?

Also define the value for s390.

---
 arch/s390/include/asm/signal.h        |    2 ++
 arch/x86/include/asm/checkpoint_hdr.h |    2 --
 arch/x86/include/asm/signal.h         |    1 +
 include/linux/checkpoint_hdr.h        |    1 +
 4 files changed, 4 insertions(+), 2 deletions(-)
arch/s390/include/asm/signal.h +2 -0
index f6cfddb..bcd7afa 100644
@@ -38,6 +38,8 @@ typedef unsigned long sigset_t;
 
 #endif /* __KERNEL__ */
 
+#define CKPT_ARCH_NSIG	64
+
 #define SIGHUP           1
 #define SIGINT           2
 #define SIGQUIT          3
arch/x86/include/asm/checkpoint_hdr.h +0 -2
index 745038b..16485ca 100644
@@ -44,8 +44,6 @@ enum {
 	CKPT_HDR_MM_CONTEXT_LDT,
 };
 
-#define CKPT_ARCH_NSIG  64
-
 struct ckpt_hdr_header_arch {
 	struct ckpt_hdr h;
 	/* FIXME: add HAVE_HWFP */
arch/x86/include/asm/signal.h +1 -0
index 7761a5d..de9147d 100644
@@ -40,6 +40,7 @@ typedef unsigned long sigset_t;
 #endif /* __KERNEL__ */
 #endif /* __ASSEMBLY__ */
 
+#define CKPT_ARCH_NSIG  64
 #define SIGHUP		 1
 #define SIGINT		 2
 #define SIGQUIT		 3
include/linux/checkpoint_hdr.h +1 -0
index 37bae3d..7d16664 100644
@@ -12,6 +12,7 @@
 
 #include <linux/types.h>
 #include <linux/utsname.h>
+#include <asm/signal.h> /* for CKPT_ARCH_NSIG */
 
 /*
  * To maintain compatibility between 32-bit and 64-bit architecture flavors,

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 10 lines · Oren Laadan
Quoted 3 lines · Serge E. Hallyn

I dunno... does this seem worth a shot? Or should I just go ahead and #define CKPT_ARCH_NSIG in arch/s390/include/asm/checkpoint_hdr.h after all?

How about leaving definition in checkpoint_hdr.h, and adding somewhere a compile bug (under __KERNEL__) if there is a mismatch, i.e. if CKPT_ARCH_NSIG != _NSIG ?

Yeah that sounds better.

thanks,
-serge