lkml.org 
[lkml]   [2003]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.5.74-mm2 + nvidia (and others)
Thomas Schlichter <schlicht@uni-mannheim.de> wrote:
>
> +#if defined(pmd_offset_map)
> +#define NV_PMD_OFFSET(address, pg_dir, pg_mid_dir) \
> + { \
> + pmd_t *pg_mid_dir__ = pmd_offset_map(pg_dir, address); \
> + pg_mid_dir = *pg_mid_dir__; \
> + pmd_unmap(pg_mid_dir__); \
> + }
> +#else
> +#define NV_PMD_OFFSET(address, pg_dir, pg_mid_dir) \
> + pg_mid_dir = *pmd_offset(pg_dir, address)
> +#endif
> +

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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.200 / U:1.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site