
From: Martin Schwidefsky <schwidefsky@de.ibm.com>

Replace mm->pgd with mm->pml4 in arch/s390 and add pte_read().

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/s390/kernel/process.c |    4 ++--
 25-akpm/include/asm-s390/pgtable.h |    7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff -puN arch/s390/kernel/process.c~4level-architecture-changes-for-s390-fix arch/s390/kernel/process.c
--- 25/arch/s390/kernel/process.c~4level-architecture-changes-for-s390-fix	2004-11-11 17:04:08.897995616 -0800
+++ 25-akpm/arch/s390/kernel/process.c	2004-11-11 17:04:08.902994856 -0800
@@ -261,14 +261,14 @@ int copy_thread(int nr, unsigned long cl
 	save_fp_regs(&current->thread.fp_regs);
 	memcpy(&p->thread.fp_regs, &current->thread.fp_regs,
 	       sizeof(s390_fp_regs));
-        p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _SEGMENT_TABLE;
+        p->thread.user_seg = __pa((unsigned long) p->mm->pml4) | _SEGMENT_TABLE;
 	/* Set a new TLS ?  */
 	if (clone_flags & CLONE_SETTLS)
 		p->thread.acrs[0] = regs->gprs[6];
 #else /* CONFIG_ARCH_S390X */
 	/* Save the fpu registers to new thread structure. */
 	save_fp_regs(&p->thread.fp_regs);
-        p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE;
+        p->thread.user_seg = __pa((unsigned long) p->mm->pml4) | _REGION_TABLE;
 	/* Set a new TLS ?  */
 	if (clone_flags & CLONE_SETTLS) {
 		if (test_thread_flag(TIF_31BIT)) {
diff -puN include/asm-s390/pgtable.h~4level-architecture-changes-for-s390-fix include/asm-s390/pgtable.h
--- 25/include/asm-s390/pgtable.h~4level-architecture-changes-for-s390-fix	2004-11-11 17:04:08.898995464 -0800
+++ 25-akpm/include/asm-s390/pgtable.h	2004-11-11 17:04:08.903994704 -0800
@@ -398,6 +398,13 @@ extern inline int pte_write(pte_t pte)
 	return (pte_val(pte) & _PAGE_RO) == 0;
 }
 
+static inline int pte_read(pte_t pte)
+{
+	/* A present pte can always be used for reading.
+	 */
+	return 1;
+}
+
 extern inline int pte_dirty(pte_t pte)
 {
 	/* A pte is neither clean nor dirty on s/390. The dirty bit
_
