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

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

diff -u --recursive --new-file v2.2.13/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -680,6 +680,9 @@
 #define KSTK_TOS(tsk) ((unsigned long)(tsk) + KERNEL_STACK_SIZE - 32)
 # define KSTK_EIP(tsk)	(*(unsigned long *)(KSTK_TOS(tsk) + PT_REG(cp0_epc)))
 # define KSTK_ESP(tsk)	(*(unsigned long *)(KSTK_TOS(tsk) + PT_REG(regs[29])))
+#elif defined(__s390__)
+#define KSTK_EIP(tsk)   ((tsk)->tss.regs->psw.addr)
+#define KSTK_ESP(tsk)   ((tsk)->tss.ksp)
 #endif
 
 /* Gcc optimizes away "strlen(x)" for constant x */
@@ -874,6 +877,9 @@
 {
 	char * orig = buffer;
 	struct task_struct *tsk;
+#ifdef  CONFIG_ARCH_S390
+	int line,len;
+#endif
 
 	read_lock(&tasklist_lock);
 	tsk = find_task_by_pid(pid);
@@ -885,6 +891,10 @@
 	buffer = task_mem(tsk, buffer);
 	buffer = task_sig(tsk, buffer);
 	buffer = task_cap(tsk, buffer);
+#ifdef CONFIG_ARCH_S390
+	for(line=0;(len=sprintf_regs(line,buffer,tsk,NULL,NULL))!=0;line++)
+		buffer+=len;
+#endif
 	return buffer - orig;
 }
 
@@ -1362,10 +1372,10 @@
 
 		case PROC_FILESYSTEMS:
 			return get_filesystem_list(page);
-
+#ifndef CONFIG_ARCH_S390
 		case PROC_DMA:
 			return get_dma_list(page);
-
+#endif
 		case PROC_IOPORTS:
 			return get_ioport_list(page);
 #ifdef CONFIG_BLK_DEV_MD

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)