mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ak@suse.de (Andreas Kleen)
To: torvalds@osdl.org
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [PATCH 5/17] Fix DRM to support 4level page tables
Date: Mon, 25 Oct 2004 09:23:49 +0200	[thread overview]
Message-ID: <417CAA05.mail3YH11FMWH@wotan.suse.de> (raw)

Fix DRM to support 4level page tables

Except for some ppc32 low level drivers DRM was the only code
in drivers that needed changes for 4levels.

Signed-off-by: Andi Kleen <ak@suse.de>

diff -urpN -X ../KDIFX linux-2.6.10rc1/drivers/char/drm/drm_memory.h linux-2.6.10rc1-4level/drivers/char/drm/drm_memory.h
--- linux-2.6.10rc1/drivers/char/drm/drm_memory.h	2004-10-19 01:55:10.000000000 +0200
+++ linux-2.6.10rc1-4level/drivers/char/drm/drm_memory.h	2004-10-25 04:48:10.000000000 +0200
@@ -121,10 +121,12 @@ agp_remap (unsigned long offset, unsigne
 	return addr;
 }
 
+/* AK: looks racy */
 static inline unsigned long
 drm_follow_page (void *vaddr)
 {
-	pgd_t *pgd = pgd_offset_k((unsigned long) vaddr);
+	pml4_t *pml4 = pml4_offset_k((unsigned long) vaddr); 
+	pgd_t *pgd = pml4_pgd_offset_k(pml4, (unsigned long) vaddr);
 	pmd_t *pmd = pmd_offset(pgd, (unsigned long) vaddr);
 	pte_t *ptep = pte_offset_kernel(pmd, (unsigned long) vaddr);
 	return pte_pfn(*ptep) << PAGE_SHIFT;

                 reply	other threads:[~2004-10-25  7:29 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=417CAA05.mail3YH11FMWH@wotan.suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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®