Skip to content

Commit

Permalink
microblaze: Fix paging init-zone initialization
Browse files Browse the repository at this point in the history
This patch fix problem with bad zone initialization.
This bug wasn't perform because Microblaze doesn't
define CONFIG_ZONE_DMA and ZONE_NORMAL was 0 for this case
that's why free_area_init works with correct values.

Original message:
I believe that the switch from ZONE_DMA (== 0) to ZONE_NORMAL
broke the free area initialization.

Signed-off-by: Steven J. Magnani <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
smagnani authored and michalsimek committed May 21, 2009
1 parent f2224ff commit 5af9043
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions arch/microblaze/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ static void __init paging_init(void)
int i;
unsigned long zones_size[MAX_NR_ZONES];

/* Clean every zones */
memset(zones_size, 0, sizeof(zones_size));

/*
* old: we can DMA to/from any address.put all page into ZONE_DMA
* We use only ZONE_NORMAL
*/
zones_size[ZONE_NORMAL] = max_mapnr;

/* every other zones are empty */
for (i = 1; i < MAX_NR_ZONES; i++)
zones_size[i] = 0;

free_area_init(zones_size);
}

Expand Down

0 comments on commit 5af9043

Please sign in to comment.