patch-1.3.96 linux/fs/proc/array.c

Next file: linux/fs/proc/inode.c
Previous file: linux/fs/nfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.95/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -470,6 +470,11 @@
 				 + (long)&((struct pt_regs *)0)->reg)
 # define KSTK_EIP(tsk)	(*(unsigned long *)(tsk->kernel_stack_page + PT_REG(pc)))
 # define KSTK_ESP(tsk)	((tsk) == current ? rdusp() : (tsk)->tss.usp)
+#elif defined(__sparc__)
+# define PT_REG(reg)            (PAGE_SIZE - sizeof(struct pt_regs)     \
+                                 + (long)&((struct pt_regs *)0)->reg)
+# define KSTK_EIP(tsk)  (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(pc)))
+# define KSTK_ESP(tsk)  (*(unsigned long *)(tsk->kernel_stack_page + PT_REG(u_regs[UREG_FP])))
 #endif
 
 /* Gcc optimizes away "strlen(x)" for constant x */
@@ -607,7 +612,7 @@
 			bit <<= 1;
 			action++;
 		}
-		
+
 		buffer += sprintf(buffer,
 			"SigIgn:\t%08lx\n"
 			"SigCgt:\t%08lx\n",

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this