Commit c7ea169d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] permit hugetlb pages to be allocated from highmem

Patch from Rohit Seth: allow hugetlb pages to be allocated from the
highmem zone.
parent 12f189a1
...@@ -319,7 +319,7 @@ set_new_inode(unsigned long len, int prot, int flag, int key) ...@@ -319,7 +319,7 @@ set_new_inode(unsigned long len, int prot, int flag, int key)
} }
if (i == MAX_ID) if (i == MAX_ID)
return NULL; return NULL;
inode = kmalloc(sizeof (struct inode), GFP_KERNEL); inode = kmalloc(sizeof (struct inode), GFP_ATOMIC);
if (inode == NULL) if (inode == NULL)
return NULL; return NULL;
...@@ -502,7 +502,7 @@ set_hugetlb_mem_size(int count) ...@@ -502,7 +502,7 @@ set_hugetlb_mem_size(int count)
if (lcount > 0) { /* Increase the mem size. */ if (lcount > 0) { /* Increase the mem size. */
while (lcount--) { while (lcount--) {
page = alloc_pages(GFP_ATOMIC, HUGETLB_PAGE_ORDER); page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
if (page == NULL) if (page == NULL)
break; break;
map = page; map = page;
......
...@@ -506,7 +506,7 @@ void __init mem_init(void) ...@@ -506,7 +506,7 @@ void __init mem_init(void)
/*Will make this kernel command line. */ /*Will make this kernel command line. */
INIT_LIST_HEAD(&htlbpage_freelist); INIT_LIST_HEAD(&htlbpage_freelist);
for (i=0; i<htlbzone_pages; i++) { 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) if (page == NULL)
break; break;
map = page; map = page;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment