summaryrefslogtreecommitdiff
path: root/include/linux/memblock.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-07 02:39:06 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-05 06:56:12 +0400
commitbf23c51f1f49d3960f3cd8e3d2e7f943d9c41042 (patch)
tree6150486aaeb3bc8601fdf61ebfe5b441af1e3fb7 /include/linux/memblock.h
parent4734b594c6ca1be796d30c82d93fdf5160f45124 (diff)
downloadlinux-bf23c51f1f49d3960f3cd8e3d2e7f943d9c41042.tar.xz
memblock: Move memblock arrays to static storage in memblock.c and make their size a variable
This is in preparation for having resizable arrays. Note that we still allocate one more than needed, this is unchanged from the previous implementation. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/linux/memblock.h')
-rw-r--r--include/linux/memblock.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index c9c7b0f344a5..150be938b910 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -18,7 +18,7 @@
#include <asm/memblock.h>
-#define MAX_MEMBLOCK_REGIONS 128
+#define INIT_MEMBLOCK_REGIONS 128
struct memblock_region {
phys_addr_t base;
@@ -26,8 +26,9 @@ struct memblock_region {
};
struct memblock_type {
- unsigned long cnt;
- struct memblock_region regions[MAX_MEMBLOCK_REGIONS+1];
+ unsigned long cnt; /* number of regions */
+ unsigned long max; /* size of the allocated array */
+ struct memblock_region *regions;
};
struct memblock {