[parisc-linux-cvs] linux amodra

Alan Modra alan@linuxcare.com.au
Fri, 23 Mar 2001 21:49:11 +1100 (EST)


On Fri, 23 Mar 2001, Alan Modra wrote:

> Modified files:
> 	arch/parisc/kernel: signal.c 
> Added files:
> 	include/asm-parisc: rt_sigframe.h 
> 
> Log message:
> Split off struct rt_sigframe to a header file.  For use by gdb.

Index: arch/parisc/kernel/signal.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/signal.c,v
retrieving revision 1.37
diff -u -p -r1.37 signal.c
--- signal.c	2001/02/09 14:39:08	1.37
+++ signal.c	2001/03/23 10:35:41
@@ -26,6 +26,7 @@
 #include <linux/unistd.h>
 #include <linux/stddef.h>
 #include <asm/ucontext.h>
+#include <asm/rt_sigframe.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
 
@@ -126,12 +127,6 @@ sys_rt_sigsuspend(sigset_t *unewset, siz
  * Do a signal return - restore sigcontext.
  */
 
-struct rt_sigframe {
-	unsigned int tramp[4];
-	struct siginfo info;
-	struct ucontext uc;
-};
-
 /* Trampoline for calling rt_sigreturn() */
 #define INSN_LDI_R25_0	 0x34190000 /* ldi  0,%r25 (in_syscall=0) */
 #define INSN_LDI_R25_1	 0x34190002 /* ldi  1,%r25 (in_syscall=1) */
@@ -140,15 +135,6 @@ struct rt_sigframe {
 #define INSN_NOP	 0x08000240 /* nop */
 /* For debugging */
 #define INSN_DIE_HORRIBLY 0x68000ccc /* stw %r0,0x666(%sr0,%r0) */
-
-/*
- * The 32-bit ABI wants at least 48 bytes for a function call frame:
- * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
- * which Linux/parisc uses is sp-20 for the saved return pointer...)
- * Then, the stack pointer must be rounded to a cache line (64 bytes).
- */
-#define PARISC_RT_SIGFRAME_SIZE					\
-	(((sizeof(struct rt_sigframe) + 48) + 63) & -64)
 
 static long
 restore_sigcontext(struct sigcontext *sc, struct pt_regs *regs)
Index: include/asm-parisc/rt_sigframe.h
===================================================================
RCS file: rt_sigframe.h
diff -N rt_sigframe.h
--- /dev/null	Tue May  5 14:32:27 1998
+++ rt_sigframe.h	Fri Mar 23 03:36:19 2001
@@ -0,0 +1,19 @@
+#ifndef _ASM_PARISC_RT_SIGFRAME_H
+#define _ASM_PARISC_RT_SIGFRAME_H
+
+struct rt_sigframe {
+	unsigned int tramp[4];
+	struct siginfo info;
+	struct ucontext uc;
+};
+
+/*
+ * The 32-bit ABI wants at least 48 bytes for a function call frame:
+ * 16 bytes for arg0-arg3, and 32 bytes for magic (the only part of
+ * which Linux/parisc uses is sp-20 for the saved return pointer...)
+ * Then, the stack pointer must be rounded to a cache line (64 bytes).
+ */
+#define PARISC_RT_SIGFRAME_SIZE					\
+	(((sizeof(struct rt_sigframe) + 48) + 63) & -64)
+
+#endif