aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 022d4cbb3618..ea31045ba704 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -26,6 +26,13 @@
26 26
27#include "internal.h" 27#include "internal.h"
28 28
29#define INIT_MEMBLOCK_REGIONS 128
30#define INIT_PHYSMEM_REGIONS 4
31
32#ifndef INIT_MEMBLOCK_RESERVED_REGIONS
33# define INIT_MEMBLOCK_RESERVED_REGIONS INIT_MEMBLOCK_REGIONS
34#endif
35
29/** 36/**
30 * DOC: memblock overview 37 * DOC: memblock overview
31 * 38 *
@@ -92,7 +99,7 @@ unsigned long max_pfn;
92unsigned long long max_possible_pfn; 99unsigned long long max_possible_pfn;
93 100
94static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock; 101static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
95static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock; 102static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_RESERVED_REGIONS] __initdata_memblock;
96#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP 103#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
97static struct memblock_region memblock_physmem_init_regions[INIT_PHYSMEM_REGIONS] __initdata_memblock; 104static struct memblock_region memblock_physmem_init_regions[INIT_PHYSMEM_REGIONS] __initdata_memblock;
98#endif 105#endif
@@ -105,7 +112,7 @@ struct memblock memblock __initdata_memblock = {
105 112
106 .reserved.regions = memblock_reserved_init_regions, 113 .reserved.regions = memblock_reserved_init_regions,
107 .reserved.cnt = 1, /* empty dummy entry */ 114 .reserved.cnt = 1, /* empty dummy entry */
108 .reserved.max = INIT_MEMBLOCK_REGIONS, 115 .reserved.max = INIT_MEMBLOCK_RESERVED_REGIONS,
109 .reserved.name = "reserved", 116 .reserved.name = "reserved",
110 117
111#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP 118#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP