swiotlb_init(1);
#endif
- num_physpages = memblock.memory.size >> PAGE_SHIFT;
+ num_physpages = memblock_phys_mem_size() >> PAGE_SHIFT;
high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
#ifdef CONFIG_NEED_MULTIPLE_NODES
struct memblock_type {
unsigned long cnt;
- phys_addr_t size;
struct memblock_region regions[MAX_MEMBLOCK_REGIONS+1];
};
struct memblock {
phys_addr_t current_limit;
+ phys_addr_t memory_size; /* Updated by memblock_analyze() */
struct memblock_type memory;
struct memblock_type reserved;
};
return;
pr_info("MEMBLOCK configuration:\n");
- pr_info(" memory.size = 0x%llx\n", (unsigned long long)memblock.memory.size);
+ pr_info(" memory size = 0x%llx\n", (unsigned long long)memblock.memory_size);
memblock_dump(&memblock.memory, "memory");
memblock_dump(&memblock.reserved, "reserved");
{
int i;
- memblock.memory.size = 0;
+ memblock.memory_size = 0;
for (i = 0; i < memblock.memory.cnt; i++)
- memblock.memory.size += memblock.memory.regions[i].size;
+ memblock.memory_size += memblock.memory.regions[i].size;
}
static long memblock_add_region(struct memblock_type *type, phys_addr_t base, phys_addr_t size)
/* You must call memblock_analyze() before this. */
phys_addr_t __init memblock_phys_mem_size(void)
{
- return memblock.memory.size;
+ return memblock.memory_size;
}
phys_addr_t memblock_end_of_DRAM(void)