Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212697
b: refs/heads/master
c: 4734b59
h: refs/heads/master
i:
  212695: e5d3eb4
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Aug 5, 2010
1 parent 06803cb commit 74f889a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d3c30f5a17ec35894eadb7171f724643dce19c3
refs/heads/master: 4734b594c6ca1be796d30c82d93fdf5160f45124
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/mm/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void __init mem_init(void)
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
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/memblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ struct memblock_region {

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;
};
Expand Down
8 changes: 4 additions & 4 deletions trunk/mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void memblock_dump_all(void)
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");
Expand Down Expand Up @@ -123,10 +123,10 @@ void __init memblock_analyze(void)
{
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)
Expand Down Expand Up @@ -423,7 +423,7 @@ phys_addr_t __init __memblock_alloc_base(phys_addr_t size, phys_addr_t align, ph
/* 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)
Expand Down

0 comments on commit 74f889a

Please sign in to comment.