]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mm/mmap.c
Merge branch 'pci-for-jesse' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6-omap-h63xx.git] / arch / arm / mm / mmap.c
index b0b5f46940705431a468efb6681a7636e40e988e..3f6dc40b835321fd469a23ce8ffa49089377e74b 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/mm.h>
 #include <linux/mman.h>
 #include <linux/shm.h>
-
+#include <linux/sched.h>
 #include <asm/system.h>
 
 #define COLOUR_ALIGN(addr,pgoff)               \
@@ -49,8 +49,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 #endif
 
        /*
-        * We should enforce the MAP_FIXED case.  However, currently
-        * the generic kernel code doesn't allow us to handle this.
+        * We enforce the MAP_FIXED case.
         */
        if (flags & MAP_FIXED) {
                if (aliasing && flags & MAP_SHARED && addr & (SHMLBA - 1))
@@ -121,6 +120,8 @@ full_search:
  */
 int valid_phys_addr_range(unsigned long addr, size_t size)
 {
+       if (addr < PHYS_OFFSET)
+               return 0;
        if (addr + size > __pa(high_memory))
                return 0;