diff options
author | Steve Magnani <steve@digidescorp.com> | 2009-05-17 21:22:40 -0400 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2009-05-21 09:56:07 -0400 |
commit | 5af90438023786e27178cc542f9a775594f8a126 (patch) | |
tree | 7018a6d75a726a5616f25dc4edc8e53cee513b90 /arch/microblaze/mm/init.c | |
parent | f2224ff07f345f3f9716071cc90ee50e29af7497 (diff) |
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>
Diffstat (limited to 'arch/microblaze/mm/init.c')
-rw-r--r-- | arch/microblaze/mm/init.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 31ec053c1dd..6ef5088a8d2 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c | |||
@@ -44,16 +44,15 @@ static void __init paging_init(void) | |||
44 | int i; | 44 | int i; |
45 | unsigned long zones_size[MAX_NR_ZONES]; | 45 | unsigned long zones_size[MAX_NR_ZONES]; |
46 | 46 | ||
47 | /* Clean every zones */ | ||
48 | memset(zones_size, 0, sizeof(zones_size)); | ||
49 | |||
47 | /* | 50 | /* |
48 | * old: we can DMA to/from any address.put all page into ZONE_DMA | 51 | * old: we can DMA to/from any address.put all page into ZONE_DMA |
49 | * We use only ZONE_NORMAL | 52 | * We use only ZONE_NORMAL |
50 | */ | 53 | */ |
51 | zones_size[ZONE_NORMAL] = max_mapnr; | 54 | zones_size[ZONE_NORMAL] = max_mapnr; |
52 | 55 | ||
53 | /* every other zones are empty */ | ||
54 | for (i = 1; i < MAX_NR_ZONES; i++) | ||
55 | zones_size[i] = 0; | ||
56 | |||
57 | free_area_init(zones_size); | 56 | free_area_init(zones_size); |
58 | } | 57 | } |
59 | 58 | ||