]> git.hungrycats.org Git - linux/commitdiff
[PATCH] permit hugetlb pages to be allocated from highmem
authorAndrew Morton <akpm@digeo.com>
Thu, 19 Sep 2002 15:37:26 +0000 (08:37 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 19 Sep 2002 15:37:26 +0000 (08:37 -0700)
Patch from Rohit Seth: allow hugetlb pages to be allocated from the
highmem zone.

arch/i386/mm/hugetlbpage.c
arch/i386/mm/init.c

index c50cec1dbafb6af670061df747f76d843c938b0c..928622ee5b22e935bee8aa0cd7934bfaba09e799 100644 (file)
@@ -319,7 +319,7 @@ set_new_inode(unsigned long len, int prot, int flag, int key)
        }
        if (i == MAX_ID)
                return NULL;
-       inode = kmalloc(sizeof (struct inode), GFP_KERNEL);
+       inode = kmalloc(sizeof (struct inode), GFP_ATOMIC);
        if (inode == NULL)
                return NULL;
 
@@ -502,7 +502,7 @@ set_hugetlb_mem_size(int count)
 
        if (lcount > 0) {       /* Increase the mem size. */
                while (lcount--) {
-                       page = alloc_pages(GFP_ATOMIC, HUGETLB_PAGE_ORDER);
+                       page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
                        if (page == NULL)
                                break;
                        map = page;
index c2042aee2b65547cb23fd8f68cdaa759bdc80e81..c672b966bcca8766d0d88d1747eb26ddf8090a9a 100644 (file)
@@ -506,7 +506,7 @@ void __init mem_init(void)
                /*Will make this kernel command line. */
                INIT_LIST_HEAD(&htlbpage_freelist);
                for (i=0; i<htlbzone_pages; i++) {
-                       page = alloc_pages(GFP_ATOMIC, HUGETLB_PAGE_ORDER);
+                       page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
                        if (page == NULL)
                                break;
                        map = page;