lkml.org 
[lkml]   [2003]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectVariable PTE_FILE_MAX_BITS
Andrew,

would you be so kind to take this and forward to Linus?
I think this segment of the code is your brainchild.

On sparc, the PTE_FILE_MAX_BITS is variable (Worse, actually...
we change all occurences in kernel text segment to correct value
at boot time.) This should not harm other arches, because
gcc is capable to optimize constant conditions.

-- Pete

--- linux-2.5.66-bk11/mm/fremap.c 2003-04-05 13:26:24.000000000 -0800
+++ linux-2.5.66-bk11-sparc/mm/fremap.c 2003-04-05 13:28:22.000000000 -0800
@@ -136,10 +136,10 @@
return err;

/* Can we represent this offset inside this architecture's pte's? */
-#if PTE_FILE_MAX_BITS < BITS_PER_LONG
- if (pgoff + (size >> PAGE_SHIFT) >= (1UL << PTE_FILE_MAX_BITS))
- return err;
-#endif
+ /* This needs to be evaluated at runtime on some platforms */
+ if (PTE_FILE_MAX_BITS < BITS_PER_LONG)
+ if (pgoff + (size >> PAGE_SHIFT) >= (1UL << PTE_FILE_MAX_BITS))
+ return err;

down_read(&mm->mmap_sem);

-
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:34    [W:0.096 / U:1.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site