From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, Haavard Skinnemoen <hskinnemoen@atmel.com>
Subject: [PATCH 6/6] AVR32: Kill CONFIG_DISCONTIGMEM support completely
Date: Mon, 31 Jul 2006 15:56:00 +0200 [thread overview]
Message-ID: <1154354160983-git-send-email-hskinnemoen@atmel.com> (raw)
In-Reply-To: <11543541603922-git-send-email-hskinnemoen@atmel.com>
Dave Hansen called discontigmem as "legacy", so since there are no
AVR32 boards that actually need it, we might as well kill it
completely. Which is what this patch does.
Whenever someone stumbles across a board with multiple memory banks,
I'll implement sparsemem support instead, hopefully with help from
Dave and Andy.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Andy Whitcroft <apw@shadowen.org>
---
arch/avr32/mm/Makefile | 1 -
arch/avr32/mm/discontig.c | 27 ---------------------------
arch/avr32/mm/init.c | 28 +++++-----------------------
include/asm-avr32/mmzone.h | 29 -----------------------------
4 files changed, 5 insertions(+), 80 deletions(-)
diff --git a/arch/avr32/mm/Makefile b/arch/avr32/mm/Makefile
index 3338374..0066491 100644
--- a/arch/avr32/mm/Makefile
+++ b/arch/avr32/mm/Makefile
@@ -4,4 +4,3 @@ #
obj-y += init.o clear_page.o copy_page.o dma-coherent.o
obj-y += ioremap.o cache.o fault.o tlb.o
-obj-$(CONFIG_DISCONTIGMEM) += discontig.o
diff --git a/arch/avr32/mm/discontig.c b/arch/avr32/mm/discontig.c
deleted file mode 100644
index d5c18ec..0000000
--- a/arch/avr32/mm/discontig.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/bootmem.h>
-
-#if MAX_NUMNODES != 4
-#error Fix Me Please
-#endif
-
-static bootmem_data_t node_bootmem_data[MAX_NUMNODES];
-pg_data_t discontig_node_data[MAX_NUMNODES] = {
- { .bdata = &node_bootmem_data[0] },
- { .bdata = &node_bootmem_data[1] },
- { .bdata = &node_bootmem_data[2] },
- { .bdata = &node_bootmem_data[3] }
-};
-
-EXPORT_SYMBOL(discontig_node_data);
-
diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index e4b6707..e33b4ff 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -36,10 +36,8 @@ struct page *empty_zero_page;
*/
unsigned long mmu_context_cache = NO_CONTEXT;
-#if !defined(CONFIG_DISCONTIGMEM)
-# define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT)
-# define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn)
-#endif
+#define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT)
+#define MAX_LOW_PFN (NODE_DATA(0)->bdata->node_low_pfn)
void show_mem(void)
{
@@ -223,27 +221,15 @@ #else
#endif
}
-#ifndef CONFIG_DISCONTIGMEM
if (mem_phys->next)
- printk(KERN_WARNING "Only using first memory bank "
- "since CONFIG_DISCONTIGMEM is off\n");
+ printk(KERN_WARNING "Only using first memory bank\n");
+
for (bank = mem_phys; bank; bank = NULL) {
-#else
- for (bank = mem_phys; bank; bank = bank->next, node++) {
-#endif
first_pfn = PFN_UP(bank->addr);
max_low_pfn = max_pfn = PFN_DOWN(bank->addr + bank->size);
bootmap_pfn = find_bootmap_pfn(bank);
- if (bootmap_pfn > max_pfn) {
-#ifndef CONFIG_DISCONTIGMEM
+ if (bootmap_pfn > max_pfn)
panic("No space for bootmem bitmap!\n");
-#else
- printk(KERN_WARNING
- "Node %u: No space for bootmem bitmap\n",
- node);
- continue;
-#endif
- }
if (max_low_pfn > MAX_LOWMEM_PFN) {
max_low_pfn = MAX_LOWMEM_PFN;
@@ -397,9 +383,7 @@ void __init paging_init(void)
pgdat->node_id, pgdat->node_mem_map);
}
-#ifndef CONFIG_DISCONTIGMEM
mem_map = NODE_DATA(0)->node_mem_map;
-#endif
memset(zero_page, 0, PAGE_SIZE);
empty_zero_page = virt_to_page(zero_page);
@@ -438,9 +422,7 @@ void __init mem_init(void)
high_memory = node_high_memory;
}
-#ifndef CONFIG_DISCONTIGMEM
max_mapnr = MAP_NR(high_memory);
-#endif
codesize = (unsigned long)_etext - (unsigned long)_text;
datasize = (unsigned long)_edata - (unsigned long)_data;
diff --git a/include/asm-avr32/mmzone.h b/include/asm-avr32/mmzone.h
deleted file mode 100644
index 13ca94f..0000000
--- a/include/asm-avr32/mmzone.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2004-2006 Atmel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#ifndef __ASM_AVR32_MMZONE_H
-#define __ASM_AVR32_MMZONE_H
-
-#include <asm/page.h>
-
-#ifdef CONFIG_DISCONTIGMEM
-
-static inline int pfn_valid(unsigned long pfn)
-{
- unsigned long __pfn = (pfn);
- int __n = pfn_to_nid(__pfn);
-
- if (__n < 0)
- return 0;
-
- return __pfn < (NODE_DATA(__n)->node_start_pfn
- + NODE_DATA(__n)->node_spanned_pages);
-}
-
-#endif /* CONFIG_DISCONTIGMEM */
-
-#endif /* __ASM_AVR32_MMZONE_H */
--
1.4.0
prev parent reply other threads:[~2006-07-31 13:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 13:55 [PATCH 1/6] AVR32: Use auto.conf instead of MARKER Haavard Skinnemoen
2006-07-31 13:55 ` [PATCH 2/6] AVR32: Don't assume anything about MAX_NR_ZONES Haavard Skinnemoen
2006-07-31 13:55 ` [PATCH 3/6] AVR32: Add nsproxy definition Haavard Skinnemoen
2006-07-31 13:55 ` [PATCH 4/6] AVR32: Add I/O port access primitives Haavard Skinnemoen
2006-07-31 13:55 ` [PATCH 5/6] AVR32: Use linux/pfn.h Haavard Skinnemoen
2006-07-31 13:56 ` Haavard Skinnemoen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1154354160983-git-send-email-hskinnemoen@atmel.com \
--to=hskinnemoen@atmel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®