[PATCH] microblaze, memblock: fix compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michal Simek <monstr@xxxxxxxxx>

  CC      arch/microblaze/mm/init.o
arch/microblaze/mm/init.c: In function 'mm_cmdline_setup':
arch/microblaze/mm/init.c:236: error: 'struct memblock_type' has no member named 'region'
arch/microblaze/mm/init.c: In function 'mmu_init':
arch/microblaze/mm/init.c:279: error: 'struct memblock_type' has no member named 'region'
arch/microblaze/mm/init.c:284: error: 'struct memblock_type' has no member named 'region'
arch/microblaze/mm/init.c:285: error: 'struct memblock_type' has no member named 'region'
arch/microblaze/mm/init.c:286: error: 'struct memblock_type' has no member named 'region'
make[1]: *** [arch/microblaze/mm/init.o] Error 1
make: *** [arch/microblaze/mm] Error 2

with this fix and microblaze can boot

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

Index: linux-2.6/arch/microblaze/mm/init.c
===================================================================
--- linux-2.6.orig/arch/microblaze/mm/init.c
+++ linux-2.6/arch/microblaze/mm/init.c
@@ -228,7 +228,7 @@ static void mm_cmdline_setup(void)
 		if (maxmem && memory_size > maxmem) {
 			memory_size = maxmem;
 			memory_end = memory_start + memory_size;
-			memblock.memory.region[0].size = memory_size;
+			memblock.memory.regions[0].size = memory_size;
 		}
 	}
 }
@@ -271,14 +271,14 @@ asmlinkage void __init mmu_init(void)
 		machine_restart(NULL);
 	}
 
-	if ((u32) memblock.memory.region[0].size < 0x1000000) {
+	if ((u32) memblock.memory.regions[0].size < 0x1000000) {
 		printk(KERN_EMERG "Memory must be greater than 16MB\n");
 		machine_restart(NULL);
 	}
 	/* Find main memory where the kernel is */
-	memory_start = (u32) memblock.memory.region[0].base;
-	memory_end = (u32) memblock.memory.region[0].base +
-				(u32) memblock.memory.region[0].size;
+	memory_start = (u32) memblock.memory.regions[0].base;
+	memory_end = (u32) memblock.memory.regions[0].base +
+				(u32) memblock.memory.regions[0].size;
 	memory_size = memory_end - memory_start;
 
 	mm_cmdline_setup(); /* FIXME parse args from command line - not used */

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]