microblaze: Fix paging init-zone initialization
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 <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
committed by
Michal Simek
parent
f2224ff07f
commit
5af9043802
@@ -44,16 +44,15 @@ static void __init paging_init(void)
|
|||||||
int i;
|
int i;
|
||||||
unsigned long zones_size[MAX_NR_ZONES];
|
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
|
* old: we can DMA to/from any address.put all page into ZONE_DMA
|
||||||
* We use only ZONE_NORMAL
|
* We use only ZONE_NORMAL
|
||||||
*/
|
*/
|
||||||
zones_size[ZONE_NORMAL] = max_mapnr;
|
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);
|
free_area_init(zones_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user