diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-07 00:39:16 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-08-05 04:56:23 +0200 |
commit | c196f76fd5ece716ee3b7fa5dda3576961c0cecc (patch) | |
tree | 7687dbae04327ed56bec60b21667eea66a9e52b4 /include | |
parent | memblock: Add "start" argument to memblock_find_base() (diff) | |
download | linux-c196f76fd5ece716ee3b7fa5dda3576961c0cecc.tar.xz linux-c196f76fd5ece716ee3b7fa5dda3576961c0cecc.zip |
memblock: NUMA allocate can now use early_pfn_map
We now provide a default (weak) implementation of memblock_nid_range()
which uses the early_pfn_map[] if CONFIG_ARCH_POPULATES_NODE_MAP
is set. Sparc still needs to use its own method due to the way
the pages can be scattered between nodes.
This implementation is inefficient due to our main algorithm and
callback construct wanting to work on an ascending addresses bases
while early_pfn_map[] would rather work with nid's (it's unsorted
at that stage). But it should work and we can look into improving
it subsequently, possibly using arch compile options to chose a
different algorithm alltogether.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memblock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index e5e8f9db3a84..82b030244aa7 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -47,6 +47,9 @@ extern long memblock_remove(phys_addr_t base, phys_addr_t size); extern long __init memblock_free(phys_addr_t base, phys_addr_t size); extern long __init memblock_reserve(phys_addr_t base, phys_addr_t size); +/* The numa aware allocator is only available if + * CONFIG_ARCH_POPULATES_NODE_MAP is set + */ extern phys_addr_t __init memblock_alloc_nid(phys_addr_t size, phys_addr_t align, int nid); extern phys_addr_t __init memblock_alloc(phys_addr_t size, phys_addr_t align); |