|
@@ -27,6 +27,9 @@
|
|
|
|
|
|
static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
|
|
static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
|
|
static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
|
|
static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
|
|
|
|
+#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
|
|
|
|
+static struct memblock_region memblock_physmem_init_regions[INIT_PHYSMEM_REGIONS] __initdata_memblock;
|
|
|
|
+#endif
|
|
|
|
|
|
struct memblock memblock __initdata_memblock = {
|
|
struct memblock memblock __initdata_memblock = {
|
|
.memory.regions = memblock_memory_init_regions,
|
|
.memory.regions = memblock_memory_init_regions,
|
|
@@ -37,6 +40,12 @@ struct memblock memblock __initdata_memblock = {
|
|
.reserved.cnt = 1, /* empty dummy entry */
|
|
.reserved.cnt = 1, /* empty dummy entry */
|
|
.reserved.max = INIT_MEMBLOCK_REGIONS,
|
|
.reserved.max = INIT_MEMBLOCK_REGIONS,
|
|
|
|
|
|
|
|
+#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
|
|
|
|
+ .physmem.regions = memblock_physmem_init_regions,
|
|
|
|
+ .physmem.cnt = 1, /* empty dummy entry */
|
|
|
|
+ .physmem.max = INIT_PHYSMEM_REGIONS,
|
|
|
|
+#endif
|
|
|
|
+
|
|
.bottom_up = false,
|
|
.bottom_up = false,
|
|
.current_limit = MEMBLOCK_ALLOC_ANYWHERE,
|
|
.current_limit = MEMBLOCK_ALLOC_ANYWHERE,
|
|
};
|
|
};
|
|
@@ -1553,6 +1562,9 @@ static int __init memblock_init_debugfs(void)
|
|
return -ENXIO;
|
|
return -ENXIO;
|
|
debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
|
|
debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
|
|
debugfs_create_file("reserved", S_IRUGO, root, &memblock.reserved, &memblock_debug_fops);
|
|
debugfs_create_file("reserved", S_IRUGO, root, &memblock.reserved, &memblock_debug_fops);
|
|
|
|
+#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
|
|
|
|
+ debugfs_create_file("physmem", S_IRUGO, root, &memblock.physmem, &memblock_debug_fops);
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|