projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
[powerpc.git]
/
mm
/
sparse-vmemmap.c
diff --git
a/mm/sparse-vmemmap.c
b/mm/sparse-vmemmap.c
index
d3b718b
..
cd75b21
100644
(file)
--- a/
mm/sparse-vmemmap.c
+++ b/
mm/sparse-vmemmap.c
@@
-24,6
+24,7
@@
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/vmalloc.h>
+#include <linux/sched.h>
#include <asm/dma.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/dma.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
@@
-33,6
+34,16
@@
* or to back the page tables that are used to create the mapping.
* Uses the main allocators if they are available, else bootmem.
*/
* or to back the page tables that are used to create the mapping.
* Uses the main allocators if they are available, else bootmem.
*/
+
+static void * __init_refok __earlyonly_bootmem_alloc(int node,
+ unsigned long size,
+ unsigned long align,
+ unsigned long goal)
+{
+ return __alloc_bootmem_node(NODE_DATA(node), size, align, goal);
+}
+
+
void * __meminit vmemmap_alloc_block(unsigned long size, int node)
{
/* If the main allocator is up use that, fallback to bootmem. */
void * __meminit vmemmap_alloc_block(unsigned long size, int node)
{
/* If the main allocator is up use that, fallback to bootmem. */
@@
-43,7
+54,7
@@
void * __meminit vmemmap_alloc_block(unsigned long size, int node)
return page_address(page);
return NULL;
} else
return page_address(page);
return NULL;
} else
- return __
alloc_bootmem_node(NODE_DATA(node)
, size, size,
+ return __
earlyonly_bootmem_alloc(node
, size, size,
__pa(MAX_DMA_ADDRESS));
}
__pa(MAX_DMA_ADDRESS));
}