[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <11543541601753-git-send-email-hskinnemoen@atmel.com>
Date: Mon, 31 Jul 2006 15:55:56 +0200
From: Haavard Skinnemoen <hskinnemoen@...el.com>
To: akpm@...l.org
Cc: linux-kernel@...r.kernel.org,
Haavard Skinnemoen <hskinnemoen@...el.com>
Subject: [PATCH 2/6] AVR32: Don't assume anything about MAX_NR_ZONES
Zero out zones_size with memset() and initialize just the zones
we need. This should avoid breakage when zones come and go.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@...el.com>
---
arch/avr32/mm/init.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index 0cb82de..7bbbd7e 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -380,7 +380,7 @@ void __init paging_init(void)
for_each_online_node(nid) {
pg_data_t *pgdat = NODE_DATA(nid);
- unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0 };
+ unsigned long zones_size[MAX_NR_ZONES];
unsigned long low, start_pfn;
start_pfn = pgdat->bdata->node_boot_start;
@@ -388,8 +388,8 @@ void __init paging_init(void)
low = pgdat->bdata->node_low_pfn;
/* All memory is DMA-able */
+ memset(zones_size, 0, sizeof(zones_size));
zones_size[ZONE_DMA] = low - start_pfn;
- zones_size[ZONE_NORMAL] = 0;
printk("Node %u: start_pfn = 0x%lx, low = 0x%lx\n",
nid, start_pfn, low);
--
1.4.0
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists