Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.6.24 /mm/nommu.c

Filename:/mm/nommu.c
Lines Added:6
Lines Deleted:2
Also changed in: (Previous) 2.6.24-rc8  2.6.24-rc7  2.6.24-rc6  2.6.24-rc5  2.6.24-rc4-git7  2.6.24-rc4-git6 
(Following) 2.6.24-git15  2.6.24-git16  2.6.24-git17  2.6.24-git18  2.6.24-git19  2.6.24-git20 

Location
[  2.6.24
  [  mm
     o  nommu.c

Patch

diff --git a/mm/nommu.c b/mm/nommu.c
index 8ed0cb4..b989cb9 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -12,6 +12,7 @@
  *  Copyright (c) 2002      Greg Ungerer <gerg@snapgear.com>
  */
 
+#include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
 #include <linux/swap.h>
@@ -44,7 +45,6 @@ int sysctl_max_map_count = DEFAULT_MAX_MAP_COUNT;
 int heap_stack_gap = 0;
 
 EXPORT_SYMBOL(mem_map);
-EXPORT_SYMBOL(__vm_enough_memory);
 EXPORT_SYMBOL(num_physpages);
 
 /* list of shareable VMAs */
@@ -176,7 +176,8 @@ EXPORT_SYMBOL(vfree);
 void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
 {
    /*
-    * kmalloc doesn't like __GFP_HIGHMEM for some reason
+    *  You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc()
+    * returns only a logical address.
     */
    return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM);
 }
@@ -828,6 +829,9 @@ unsigned long do_mmap_pgoff(struct file *file,
    void *result;
    int ret;
 
+   if (!(flags & MAP_FIXED))
+      addr = round_hint_to_min(addr);
+
    /* decide whether we should attempt the mapping, and if so what sort of
     * mapping */
    ret = validate_mmap_request(file, addr, len, prot, flags, pgoff,


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.