Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212699
b: refs/heads/master
c: 449e8df
h: refs/heads/master
i:
  212697: 74f889a
  212695: e5d3eb4
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Aug 5, 2010
1 parent 2c569bb commit fcf1609
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf23c51f1f49d3960f3cd8e3d2e7f943d9c41042
refs/heads/master: 449e8df39d3f94a69deae8341f157f6ef5999015
11 changes: 11 additions & 0 deletions trunk/mm/memblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/bitops.h>
#include <linux/poison.h>
#include <linux/memblock.h>

struct memblock memblock;
Expand Down Expand Up @@ -112,6 +113,10 @@ void __init memblock_init(void)
memblock.reserved.regions = memblock_reserved_init_regions;
memblock.reserved.max = INIT_MEMBLOCK_REGIONS;

/* Write a marker in the unused last array entry */
memblock.memory.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE;
memblock.reserved.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE;

/* Create a dummy zero size MEMBLOCK which will get coalesced away later.
* This simplifies the memblock_add() code below...
*/
Expand All @@ -131,6 +136,12 @@ void __init memblock_analyze(void)
{
int i;

/* Check marker in the unused last array entry */
WARN_ON(memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS].base
!= (phys_addr_t)RED_INACTIVE);
WARN_ON(memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS].base
!= (phys_addr_t)RED_INACTIVE);

memblock.memory_size = 0;

for (i = 0; i < memblock.memory.cnt; i++)
Expand Down

0 comments on commit fcf1609

Please sign in to comment.