Skip to contentSkip to conversation

Add 4/8 bytes to 'struct k_sigaction'...

RFC In review Steven J. Hill 3 participants 4 messages Jan 6, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

RFC 1/1 Add 4/8 bytes to 'struct k_sigaction'...

In order support easy building of IRIX emulation support as either a module or statically, I would like to simply have the 'sa_restorer' function pointer be defined for all big endian architectures. This means extra storage space, but I wanted comments first. The problem is that if you configure for IRIX, build and then decide that you want to build it as a module, CONFIG_BINFMT_IRIX_MODULE gets defined instead of CONFIG_BINFMT_IRIX and hence 'signal.h' changes and the whole kernel has to be rebuilt. If we simply have it be defined for big endian architectures regardless, then there is no recompile. Al Viro did comment that Christoph Hellwig may be moving stuff like 'struct sighand_struct' out of 'sched.h' along with some other things which might make this below a non-issue, but that is far off. Comments before I commit?

-Steve

Index: signal.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/signal.h,v retrieving revision 1.17

signal.h +1 -1
diff -u -r1.17 signal.h
@@ -135,7 +135,7 @@
 
 struct k_sigaction {
 	struct sigaction sa;
-#ifdef CONFIG_BINFMT_IRIX
+#if !defined(CONFIG_CPU_LITTLE_ENDIAN)
 	void		(*sa_restorer)(void);
 #endif
 };
#1 lore raw

signal.h line 140

Quoted 10 lines
signal.h +1 -1
@@ -135,7 +135,7 @@
 
 struct k_sigaction {
 	struct sigaction sa;
-#ifdef CONFIG_BINFMT_IRIX
+#if !defined(CONFIG_CPU_LITTLE_ENDIAN)
 	void		(*sa_restorer)(void);
 #endif

#ifdef __mipseb__ maybe?

Is IRIX emulation even working?

#2 lore raw
Quoted 3 lines

#ifdef __mipseb__ maybe?

I thought about that too. I spoke with Ralf on IRC privately and there are race conditions associated with removing the module. That aside, I was concerned about how people felt about the extra 4 or 8 bytes.

Quoted 2 lines

Is IRIX emulation even working?

That is what I am working on.

-Steve

#3 lore raw
In reply to Christoph Hellwig
Quoted 4 lines · Christoph Hellwig
Quoted 4 lines
signal.h +0 -0
@@ -135,7 +135,7 @@
 
Quoted 8 lines

signal.h line 140

Quoted 6 lines
signal.h +1 -1
 struct k_sigaction {
 	struct sigaction sa;
-#ifdef CONFIG_BINFMT_IRIX
+#if !defined(CONFIG_CPU_LITTLE_ENDIAN)
 	void		(*sa_restorer)(void);
 #endif

#ifdef __mipseb__ maybe?

AFAICS most parts of the kernel seem to prefer CONFIG_CPU_LITTLE_ENDIAN over compiler-dependent macros. (And IIRC it would need to be __MIPSEB.)

Thiemo