+ avr32-kill-config_discontigmem-support-completely.patch added to -mm tree

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

 



The patch titled

     AVR32: Kill CONFIG_DISCONTIGMEM support completely

has been added to the -mm tree.  Its filename is

     avr32-kill-config_discontigmem-support-completely.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: AVR32: Kill CONFIG_DISCONTIGMEM support completely
From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>

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@xxxxxxxxx>
Cc: Dave Hansen <haveblue@xxxxxxxxxx>
Cc: Andy Whitcroft <apw@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 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 -puN arch/avr32/mm/discontig.c~avr32-kill-config_discontigmem-support-completely /dev/null
--- 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 -puN arch/avr32/mm/init.c~avr32-kill-config_discontigmem-support-completely arch/avr32/mm/init.c
--- a/arch/avr32/mm/init.c~avr32-kill-config_discontigmem-support-completely
+++ a/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 @@ void __init setup_bootmem(void)
 #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 -puN arch/avr32/mm/Makefile~avr32-kill-config_discontigmem-support-completely arch/avr32/mm/Makefile
--- a/arch/avr32/mm/Makefile~avr32-kill-config_discontigmem-support-completely
+++ a/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 -puN include/asm-avr32/mmzone.h~avr32-kill-config_discontigmem-support-completely /dev/null
--- 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 */
_

Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are

avr32-arch.patch
avr32-config_debug_bugverbose-and-config_frame_pointer.patch
avr32-fix-invalid-constraints-for-stcond.patch
avr32-add-support-for-irq-flags-state-tracing.patch
avr32-turn-off-support-for-discontigmem-and-sparsemem.patch
avr32-always-enable-config_embedded.patch
avr32-export-the-find__bit-functions.patch
avr32-add-defconfig-for-at32stk1002.patch
avr32-use-autoconf-instead-of-marker.patch
avr32-dont-assume-anything-about-max_nr_zones.patch
avr32-add-nsproxy-definition.patch
avr32-add-i-o-port-access-primitives.patch
avr32-use-linux-pfnh.patch
avr32-kill-config_discontigmem-support-completely.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux