All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schlemmer <azarah@gentoo.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Thomas Schlichter <schlicht@uni-mannheim.de>,
	smiler@lanil.mine.nu, KML <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: 2.5.74-mm2 + nvidia (and others)
Date: 08 Jul 2003 09:03:39 +0200	[thread overview]
Message-ID: <1057647818.5489.385.camel@workshop.saharacpt.lan> (raw)
In-Reply-To: <20030707123012.47238055.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Mon, 2003-07-07 at 21:30, Andrew Morton wrote:

> Well that will explode if someone enables highpmd and has highmem.
> This would be better:
> 
> --- nv.c.orig	2003-07-05 22:55:10.000000000 -0700
> +++ nv.c	2003-07-05 22:55:58.000000000 -0700
> @@ -2105,11 +2105,14 @@
>      if (pgd_none(*pg_dir))
>          goto failed;
>  
> -    pg_mid_dir = pmd_offset(pg_dir, address);
> -    if (pmd_none(*pg_mid_dir))
> +    pg_mid_dir = pmd_offset_map(pg_dir, address);
> +    if (pmd_none(*pg_mid_dir)) {
> +	pmd_unmap(pg_mid_dir);
>          goto failed;
> +    }
>  
>      NV_PTE_OFFSET(address, pg_mid_dir, pte);
> +    pmd_unmap(pg_mid_dir);
>  
>      if (!pte_present(pte))
>          goto failed;
> 
> -

Bit too specific to -mm2, what about the the attached?


Regards,

-- 
Martin Schlemmer


[-- Attachment #2: NVIDIA_kernel-1.0-4363-highpmd.diff --]
[-- Type: text/x-patch, Size: 1425 bytes --]

diff -urpN NVIDIA_kernel-1.0-4363.orig/nv-linux.h NVIDIA_kernel-1.0-4363/nv-linux.h
--- NVIDIA_kernel-1.0-4363.orig/nv-linux.h	2003-04-20 03:57:19.000000000 +0200
+++ NVIDIA_kernel-1.0-4363/nv-linux.h	2003-07-08 07:53:49.000000000 +0200
@@ -186,6 +186,15 @@
     }
 #endif
 
+#if defined(pmd_offset_map)
+#define NV_PMD_OFFSET(address, pg_dir) \
+    pmd_offset_map(pg_dir, address);
+#define NV_PMD_OFFSET_UNMAP 1
+#else
+#define NV_PMD_OFFSET(address, pg_dir) \
+    pmd_offset(pg_dir, address)
+#endif
+
 #define NV_PAGE_ALIGN(addr)             ( ((addr) + PAGE_SIZE - 1) / PAGE_SIZE)
 #define NV_MASK_OFFSET(addr)            ( (addr) & (PAGE_SIZE - 1) )
 
diff -urpN NVIDIA_kernel-1.0-4363.orig/nv.c NVIDIA_kernel-1.0-4363/nv.c
--- NVIDIA_kernel-1.0-4363.orig/nv.c	2003-04-20 03:57:19.000000000 +0200
+++ NVIDIA_kernel-1.0-4363/nv.c	2003-07-08 07:55:09.000000000 +0200
@@ -2191,11 +2191,18 @@ nv_get_phys_address(unsigned long addres
     if (pgd_none(*pg_dir))
         goto failed;
 
-    pg_mid_dir = pmd_offset(pg_dir, address);
-    if (pmd_none(*pg_mid_dir))
+    pg_mid_dir = NV_PMD_OFFSET(pg_dir, address);
+    if (pmd_none(*pg_mid_dir)) {
+#if defined(NV_PMD_OFFSET_UNMAP)
+       pmd_unmap(pg_mid_dir);
+#endif
         goto failed;
+    }
 
     NV_PTE_OFFSET(address, pg_mid_dir, pte);
+#if defined(NV_PMD_OFFSET_UNMAP)
+    pmd_unmap(pg_mid_dir);
+#endif
 
     if (!pte_present(pte))
         goto failed;

  reply	other threads:[~2003-07-08  6:48 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-07 15:08 2.5.74-mm2 + nvidia (and others) Christian Axelsson
2003-07-07 15:33 ` Thomas Schlichter
2003-07-07 17:09   ` Christian Axelsson
2003-07-07 19:30   ` Andrew Morton
2003-07-07 19:30     ` Andrew Morton
2003-07-08  7:03     ` Martin Schlemmer [this message]
2003-07-08  7:26       ` William Lee Irwin III
2003-07-08  7:26         ` William Lee Irwin III
2003-07-08  8:51         ` Thomas Schlichter
2003-07-08  8:51           ` Thomas Schlichter
2003-07-08  8:55           ` William Lee Irwin III
2003-07-08  8:55             ` William Lee Irwin III
2003-07-08  9:37             ` Peter C. Ndikuwera
2003-07-08  9:37               ` Peter C. Ndikuwera
2003-07-08 11:01               ` Petr Vandrovec
2003-07-08 11:01                 ` Petr Vandrovec
2003-07-08 11:23                 ` Flameeyes
2003-07-08 11:23                   ` Flameeyes
2003-07-08 11:26                   ` William Lee Irwin III
2003-07-08 11:26                     ` William Lee Irwin III
2003-07-08 11:35                   ` Christian Axelsson
2003-07-08 11:40       ` Christian Axelsson
2003-07-12  1:21       ` William Lee Irwin III
2003-07-12  1:21         ` William Lee Irwin III
2003-07-14 12:09         ` Martin Schlemmer
2003-07-14 12:09           ` Martin Schlemmer
2003-07-14 16:51           ` Thomas Schlichter
2003-07-14 16:51             ` Thomas Schlichter
2003-07-07 23:08 ` William Lee Irwin III
2003-07-07 23:08   ` William Lee Irwin III
  -- strict thread matches above, loose matches on Subject: below --
2003-07-08 12:37 Petr Vandrovec
2003-07-08 12:37 ` Petr Vandrovec
2003-07-08 12:57 ` Flameeyes
2003-07-08 12:57   ` Flameeyes
2003-07-08 13:02 ` Christian Axelsson
2003-07-08 13:07   ` Petr Vandrovec
2003-07-08 13:07     ` Petr Vandrovec

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=1057647818.5489.385.camel@workshop.saharacpt.lan \
    --to=azarah@gentoo.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=schlicht@uni-mannheim.de \
    --cc=smiler@lanil.mine.nu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.