microblaze: Fix paging init-zone initialization

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Friday, June 12, 2009 - 2:01 pm

Gitweb:     http://git.kernel.org/linus/5af90438023786e27178cc542f9a775594f8a126
Commit:     5af90438023786e27178cc542f9a775594f8a126
Parent:     f2224ff07f345f3f9716071cc90ee50e29af7497
Author:     Steve Magnani <steve@digidescorp.com>
AuthorDate: Mon May 18 03:22:40 2009 +0200
Committer:  Michal Simek <monstr@monstr.eu>
CommitDate: Thu May 21 15:56:07 2009 +0200

    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>
---
 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 31ec053..6ef5088 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -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);
 }
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
microblaze: Fix paging init-zone initialization, Linux Kernel Mailing ..., (Fri Jun 12, 2:01 pm)