From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: [6/7] 160 sparsemem i386 In-Reply-To: <1098973549.shadowen.org Message-Id: From: Andy Whitcroft Date: Thu, 28 Oct 2004 15:26:22 +0100 Sender: owner-linux-mm@kvack.org Return-Path: To: haveblue@us.ibm.com, lhms-devel@lists.sourceforge.net Cc: linux-mm@kvack.org, apw@shadowen.org List-ID: CONFIG_NONLINEAR for i386 Revision: $Rev$ Signed-off-by: Andy Whitcroft diffstat 160-sparsemem-i386 --- arch/i386/Kconfig | 22 ++++++-- arch/i386/kernel/numaq.c | 5 + arch/i386/kernel/setup.c | 7 +- arch/i386/kernel/srat.c | 5 + arch/i386/mm/Makefile | 2 arch/i386/mm/discontig.c | 97 ++++++++++++++++++++++--------------- arch/i386/mm/init.c | 19 ++++--- include/asm-i386/mmzone.h | 115 ++++++++++++++++++++++++++++++++++----------- include/asm-i386/page.h | 4 - include/asm-i386/pgtable.h | 4 - 10 files changed, 193 insertions(+), 87 deletions(-) diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/i386/Kconfig current/arch/i386/Kconfig --- reference/arch/i386/Kconfig +++ current/arch/i386/Kconfig @@ -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 @@ -738,16 +738,28 @@ 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 +choice + prompt "Memory model" + default SPARSEMEM if (X86_NUMAQ || X86_SUMMIT) + default FLATMEM + +config DISCONTIGMEM + bool "Discontigious Memory" + +config SPARSEMEM + bool "Sparse Memory" + +config FLATMEM + bool "Flat Memory" + +endchoice + config HIGHPTE bool "Allocate 3rd-level pagetables from highmem" depends on HIGHMEM4G || HIGHMEM64G diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/i386/kernel/numaq.c current/arch/i386/kernel/numaq.c --- reference/arch/i386/kernel/numaq.c +++ current/arch/i386/kernel/numaq.c @@ -60,6 +60,11 @@ static void __init smp_dump_qct(void) eq->hi_shrd_mem_start - eq->priv_mem_size); node_end_pfn[node] = MB_TO_PAGES( eq->hi_shrd_mem_start + eq->hi_shrd_mem_size); +#ifdef CONFIG_SPARSEMEM + sparse_add(node, node_start_pfn[node], + node_end_pfn[node]); +#endif + } } } diff -X /home/apw/brief/lib/vdiff.excl -rupN reference/arch/i386/kernel/setup.c current/arch/i386/kernel/setup.c --- reference/arch/i386/kernel/setup.c +++ current/arch/i386/kernel/setup.c @@ -39,6 +39,7 @@ #include #include #include +#include #include