diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9bef61b303674e3be48a0fbb403ee7d85c126e30..8290b69da20214a7e19fedd0fc047d33d5d82ba7 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -549,6 +549,11 @@ config NUMA Access). This option is for configuring high-end multiprocessor server machines. If in doubt, say N. +config NODES_SHIFT + int + default "7" + depends on NEED_MULTIPLE_NODES + # LARGE_VMALLOC is racy, if you *really* need it then fix it first config ALPHA_LARGE_VMALLOC bool diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dc5a9332c91597f7cbc82d06db7be40138f7d551..1dbf6ddb300d2b5a9cfafd9e064dffee468dec52 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -512,6 +512,12 @@ config ARCH_DISCONTIGMEM_ENABLE or have huge holes in the physical address space for other reasons. See for more. +config NODES_SHIFT + int + default "4" if ARCH_LH7A40X + default "2" + depends on NEED_MULTIPLE_NODES + source "mm/Kconfig" config LEDS diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 57301db056f59d49004e0a6aa41f6606142822a9..18ec9fe6deb69d887a1f48a204c7b126cb633e04 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -522,6 +522,12 @@ config NUMA comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) +config NODES_SHIFT + int + default "4" if X86_NUMAQ + default "3" + depends on NEED_MULTIPLE_NODES + config HAVE_ARCH_BOOTMEM_NODE bool depends on NUMA diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index edffe25a477ab597a6615288df78ebdf976a0bba..9f40eeff0b5cec3cfec4ddfc6143fc30ca852b85 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -260,15 +260,6 @@ config NR_CPUS than 64 will cause the use of a CPU mask array, causing a small performance hit. -config IA64_NR_NODES - int "Maximum number of NODEs (256-1024)" if (IA64_SGI_SN2 || IA64_GENERIC) - range 256 1024 - depends on IA64_SGI_SN2 || IA64_GENERIC - default "256" - help - This option specifies the maximum number of nodes in your SSI system. - If in doubt, use the default. - config HOTPLUG_CPU bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" depends on SMP && EXPERIMENTAL @@ -352,6 +343,16 @@ config NUMA Access). This option is for configuring high-end multiprocessor server systems. If in doubt, say N. +config NODES_SHIFT + int "Max num nodes shift(3-10)" + range 3 10 + default "8" + depends on NEED_MULTIPLE_NODES + help + This option specifies the maximum number of nodes in your SSI system. + MAX_NUMNODES will be 2^(This value). + If in doubt, use the default. + # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. # VIRTUAL_MEM_MAP has been retained for historical reasons. config VIRTUAL_MEM_MAP diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 05c864c6c2d937e31f893c3b1aa783e190906c33..41fd490af3b47a93c70e829a561506151f1e6e09 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -285,6 +285,11 @@ config NUMA depends on SMP && BROKEN default n +config NODES_SHIFT + int + default "1" + depends on NEED_MULTIPLE_NODES + # turning this on wastes a bunch of space. # Summit needs it only when NUMA is on config BOOT_IOREMAP diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e15709ce886626158aba18c05851cb5bc04065c6..7aec60d4042091b1648b3f491194477cd266f909 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1590,6 +1590,11 @@ config ARCH_FLATMEM_ENABLE def_bool y depends on !NUMA +config NODES_SHIFT + int + default "6" + depends on NEED_MULTIPLE_NODES + source "mm/Kconfig" config SMP diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 2fdf21989dc20a88d0d288bdf190dd3837bf8aaf..19f911c5dd58dce00114fc4ed397c7445952a6f8 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -177,6 +177,11 @@ config ARCH_DISCONTIGMEM_DEFAULT def_bool y depends on ARCH_DISCONTIGMEM_ENABLE +config NODES_SHIFT + int + default "3" + depends on NEED_MULTIPLE_NODES + source "kernel/Kconfig.preempt" source "kernel/Kconfig.hz" source "mm/Kconfig" diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2cdc35ce80451c5e503e97904cd763474d63b752..167e70e95556c0a7f6a281a96114773e46418fe9 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -649,6 +649,11 @@ config NUMA depends on PPC64 default y if SMP && PPC_PSERIES +config NODES_SHIFT + int + default "4" + depends on NEED_MULTIPLE_NODES + config ARCH_SELECT_MEMORY_MODEL def_bool y depends on PPC64 diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 58583f4594719ddcd5da635bec148858ef5807fc..2bcecf42257343e0b2af310bf0b43b2b16fc3e93 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -527,6 +527,11 @@ config CPU_HAS_SR_RB See for further information on SR.RB and register banking in the kernel in general. +config NODES_SHIFT + int + default "1" + depends on NEED_MULTIPLE_NODES + endmenu menu "Boot options" diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 7df2fe1844be737aee6f377906ddc39bc6c0fcf1..408d44a59756f8050c4455fdbb471eb9c9881f09 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -288,6 +288,11 @@ config K8_NUMA Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA instead, which also takes priority if both are compiled in. +config NODES_SHIFT + int + default "6" + depends on NEED_MULTIPLE_NODES + # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. config X86_64_ACPI_NUMA diff --git a/include/asm-alpha/numnodes.h b/include/asm-alpha/numnodes.h deleted file mode 100644 index cd425827e4f358760e21e8c062bb9d7a99b97c25..0000000000000000000000000000000000000000 --- a/include/asm-alpha/numnodes.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _ASM_MAX_NUMNODES_H -#define _ASM_MAX_NUMNODES_H - -/* Max 128 Nodes - Marvel */ -#define NODES_SHIFT 7 - -#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-arm/arch-lh7a40x/memory.h b/include/asm-arm/arch-lh7a40x/memory.h index c92bcb8376295912d2839a196311029243a3895c..9f1a58cbf407dfa1a3b37b8caac598bd0c5aa872 100644 --- a/include/asm-arm/arch-lh7a40x/memory.h +++ b/include/asm-arm/arch-lh7a40x/memory.h @@ -31,8 +31,6 @@ #ifdef CONFIG_DISCONTIGMEM -#define NODES_SHIFT 4 /* Up to 16 nodes */ - /* * Given a kernel address, find the home node of the underlying memory. */ diff --git a/include/asm-arm/numnodes.h b/include/asm-arm/numnodes.h deleted file mode 100644 index 8df36818ebc9d2897d3bee39bc6751ec5be4eb0e..0000000000000000000000000000000000000000 --- a/include/asm-arm/numnodes.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * linux/include/asm-arm/numnodes.h - * - * Copyright (C) 2002 Russell King - * - * 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. - */ - -/* This declaration for the size of the NUMA (CONFIG_DISCONTIGMEM) - * memory node table is the default. - * - * A good place to override this value is include/asm/arch/memory.h. - */ - -#ifndef __ASM_ARM_NUMNODES_H -#define __ASM_ARM_NUMNODES_H - -#include - -#ifndef NODES_SHIFT -# define NODES_SHIFT 2 /* Normally, Max 4 Nodes */ -#endif - -#endif diff --git a/include/asm-i386/numnodes.h b/include/asm-i386/numnodes.h deleted file mode 100644 index a61f38c8176f44a31daab940ef25943e5c41242c..0000000000000000000000000000000000000000 --- a/include/asm-i386/numnodes.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _ASM_MAX_NUMNODES_H -#define _ASM_MAX_NUMNODES_H - -#include - -#ifdef CONFIG_X86_NUMAQ - -/* Max 16 Nodes */ -#define NODES_SHIFT 4 - -#elif defined(CONFIG_ACPI_SRAT) - -/* Max 8 Nodes */ -#define NODES_SHIFT 3 - -#endif /* CONFIG_X86_NUMAQ */ - -#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-ia64/numnodes.h b/include/asm-ia64/numnodes.h deleted file mode 100644 index e9d356f549d908556f0e5973c90d3186527dcc97..0000000000000000000000000000000000000000 --- a/include/asm-ia64/numnodes.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _ASM_MAX_NUMNODES_H -#define _ASM_MAX_NUMNODES_H - -#ifdef CONFIG_IA64_DIG -/* Max 8 Nodes */ -# define NODES_SHIFT 3 -#elif defined(CONFIG_IA64_HP_ZX1) || defined(CONFIG_IA64_HP_ZX1_SWIOTLB) -/* Max 32 Nodes */ -# define NODES_SHIFT 5 -#elif defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_GENERIC) -# if CONFIG_IA64_NR_NODES == 256 -# define NODES_SHIFT 8 -# elif CONFIG_IA64_NR_NODES <= 512 -# define NODES_SHIFT 9 -# elif CONFIG_IA64_NR_NODES <= 1024 -# define NODES_SHIFT 10 -# endif -#endif - -#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-m32r/numnodes.h b/include/asm-m32r/numnodes.h deleted file mode 100644 index 479a39d49f83533afbb537f7e2078bb361d1ceef..0000000000000000000000000000000000000000 --- a/include/asm-m32r/numnodes.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _ASM_NUMNODES_H_ -#define _ASM_NUMNODES_H_ - -#include - -#ifdef CONFIG_DISCONTIGMEM - -#if defined(CONFIG_CHIP_M32700) -#define NODES_SHIFT 1 /* Max 2 Nodes */ -#endif /* CONFIG_CHIP_M32700 */ - -#endif /* CONFIG_DISCONTIGMEM */ - -#endif /* _ASM_NUMNODES_H_ */ - diff --git a/include/asm-mips/numnodes.h b/include/asm-mips/numnodes.h deleted file mode 100644 index 4f00c16ceeb0e5a77501806370712848d02aada4..0000000000000000000000000000000000000000 --- a/include/asm-mips/numnodes.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _ASM_MAX_NUMNODES_H -#define _ASM_MAX_NUMNODES_H - -/* Max 128 Nodes */ -#define NODES_SHIFT 6 - -#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-parisc/numnodes.h b/include/asm-parisc/numnodes.h deleted file mode 100644 index 6c67651efd1c82b547ea52a9a3f498968e35241a..0000000000000000000000000000000000000000 --- a/include/asm-parisc/numnodes.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _ASM_MAX_NUMNODES_H -#define _ASM_MAX_NUMNODES_H - -/* Max 8 Nodes */ -#define NODES_SHIFT 3 - -#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-powerpc/numnodes.h b/include/asm-powerpc/numnodes.h deleted file mode 100644 index e138edae09ddfea3209d0a3680d8e6d4ef51027d..0000000000000000000000000000000000000000 --- a/include/asm-powerpc/numnodes.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _ASM_POWERPC_MAX_NUMNODES_H -#define _ASM_POWERPC_MAX_NUMNODES_H -#ifdef __KERNEL__ - -/* Max 16 Nodes */ -#define NODES_SHIFT 4 - -#endif /* __KERNEL__ */ -#endif /* _ASM_POWERPC_MAX_NUMNODES_H */ diff --git a/include/asm-sh/numnodes.h b/include/asm-sh/numnodes.h deleted file mode 100644 index f73e85b72ecbdd840db0be4c42e77ac771d0b781..0000000000000000000000000000000000000000 --- a/include/asm-sh/numnodes.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _ASM_MAX_NUMNODES_H -#define _ASM_MAX_NUMNODES_H - -/* Max 2 Nodes */ -#define NODES_SHIFT 1 - -#endif /* _ASM_MAX_NUMNODES_H */ diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index f0ba4d984bdf7f561d759480d54990d968729be3..1cc92fe02503d00abee3782364dfad767e19386f 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h @@ -2,7 +2,6 @@ #define _ASM_X8664_NUMA_H 1 #include -#include struct bootnode { u64 start,end; diff --git a/include/asm-x86_64/numnodes.h b/include/asm-x86_64/numnodes.h deleted file mode 100644 index 5a1d506b829905bfd4a29f8d5383d7a766de288e..0000000000000000000000000000000000000000 --- a/include/asm-x86_64/numnodes.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef _ASM_X8664_NUMNODES_H -#define _ASM_X8664_NUMNODES_H 1 - -#include - -#ifdef CONFIG_NUMA -#define NODES_SHIFT 6 -#endif - -#endif diff --git a/include/linux/numa.h b/include/linux/numa.h index f0c539bd3cfc44e07eaafc26bcf358c29c0fc65f..e481feb1bfd81e061e3c2488ece336f936fdc9d6 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h @@ -3,11 +3,9 @@ #include -#ifndef CONFIG_FLATMEM -#include -#endif - -#ifndef NODES_SHIFT +#ifdef CONFIG_NODES_SHIFT +#define NODES_SHIFT CONFIG_NODES_SHIFT +#else #define NODES_SHIFT 0 #endif