Add 4/8 bytes to 'struct k_sigaction'...
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
@@ -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 };
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?
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
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
-1struct 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