From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j2H0SNua500412 for ; Wed, 16 Mar 2005 19:28:23 -0500 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j2H0SKV8191414 for ; Wed, 16 Mar 2005 17:28:21 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j2H0SK7Z002917 for ; Wed, 16 Mar 2005 17:28:20 -0700 Subject: [RFC][PATCH 4/6] sparsemem: i386 implementation From: Dave Hansen Date: Wed, 16 Mar 2005 16:28:18 -0800 Message-Id: Sender: owner-linux-mm@kvack.org Return-Path: To: linux-arch@vger.kernel.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Hansen , apw@shadowen.org List-ID: Start using mm/Kconfig for i386, use CONFIG_FLATMEM, and straighten out some NUMA vs. DISCONTIG config confusion. Also Make sure to disable sparsemem selection if the user doesn't need it. Only the NUMA sub-architectures need it for now. Signed-off-by: Dave Hansen --- memhotplug-dave/arch/i386/Kconfig | 27 ++++++++--- memhotplug-dave/arch/i386/kernel/setup.c | 4 + memhotplug-dave/arch/i386/mm/Makefile | 2 memhotplug-dave/arch/i386/mm/discontig.c | 35 ++++++++------ memhotplug-dave/arch/i386/mm/init.c | 10 ++-- memhotplug-dave/include/asm-i386/mmzone.h | 68 +++++++++++++++++++++-------- memhotplug-dave/include/asm-i386/page.h | 4 - memhotplug-dave/include/asm-i386/pgtable.h | 4 - 8 files changed, 102 insertions(+), 52 deletions(-) diff -puN arch/i386/Kconfig~B-sparse-160-sparsemem-i386 arch/i386/Kconfig --- memhotplug/arch/i386/Kconfig~B-sparse-160-sparsemem-i386 2005-03-16 16:13:36.000000000 -0800 +++ memhotplug-dave/arch/i386/Kconfig 2005-03-16 16:14:00.000000000 -0800 @@ -68,7 +68,7 @@ config X86_VOYAGER config X86_NUMAQ bool "NUMAQ (IBM/Sequent)" - select DISCONTIGMEM + #select DISCONTIGMEM select NUMA help This option is used for getting Linux to run on a (IBM/Sequent) NUMA @@ -767,17 +767,12 @@ comment "NUMA (NUMA-Q) requires SMP, 64G comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) -config DISCONTIGMEM - bool - depends on NUMA - default y - config HAVE_ARCH_BOOTMEM_NODE bool depends on NUMA default y -config HAVE_MEMORY_PRESENT +config ARCH_HAVE_MEMORY_PRESENT bool depends on DISCONTIGMEM default y @@ -792,6 +787,24 @@ config HAVE_ARCH_ALLOC_REMAP depends on NUMA default y +config ARCH_DISCONTIGMEM_ENABLE + def_bool y + depends on NUMA + +config ARCH_DISCONTIGMEM_DEFAULT + def_bool y + depends on NUMA + +config ARCH_SPARSEMEM_ENABLE + def_bool y + depends on NUMA + +config ARCH_FLATMEM_DISABLE + def_bool y + depends on NUMA + +source "mm/Kconfig" + config HIGHPTE bool "Allocate 3rd-level pagetables from highmem" depends on HIGHMEM4G || HIGHMEM64G diff -puN arch/i386/kernel/setup.c~B-sparse-160-sparsemem-i386 arch/i386/kernel/setup.c --- memhotplug/arch/i386/kernel/setup.c~B-sparse-160-sparsemem-i386 2005-03-16 16:13:36.000000000 -0800 +++ memhotplug-dave/arch/i386/kernel/setup.c 2005-03-16 16:13:36.000000000 -0800 @@ -41,6 +41,7 @@ #include #include #include +#include #include