mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [patch] s390: get 4 level pgds working.
Date: Thu, 11 Nov 2004 18:14:57 +0100	[thread overview]
Message-ID: <20041111171457.GB4900@mschwid3.boeblingen.de.ibm.com> (raw)

[patch] s390: get 4 level pgds working.

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>

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

diff -urN linux-2.6/arch/s390/kernel/process.c linux-2.6-mm/arch/s390/kernel/process.c
--- linux-2.6/arch/s390/kernel/process.c	2004-11-11 15:59:51.000000000 +0100
+++ linux-2.6-mm/arch/s390/kernel/process.c	2004-11-11 15:44:19.000000000 +0100
@@ -261,14 +261,14 @@
 	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 -urN linux-2.6/include/asm-s390/pgtable.h linux-2.6-mm/include/asm-s390/pgtable.h
--- linux-2.6/include/asm-s390/pgtable.h	2004-11-11 16:00:42.000000000 +0100
+++ linux-2.6-mm/include/asm-s390/pgtable.h	2004-11-11 15:52:26.000000000 +0100
@@ -398,6 +398,13 @@
 	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

                 reply	other threads:[~2004-11-11 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041111171457.GB4900@mschwid3.boeblingen.de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®