Commit 74c8f65c authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] x86_64: Allow to configure more CPUs and nodes.

Allow to configure more CPUs and nodes.

With clustered mode and AMD's big flat APIC mode there is no reason anymore to
limit the max number of CPUs to 8.  Increase the limit to 256 for now, which
is the current APIC limit. 

Untested for now.

Also increase the max number of nodes to 64.  Remove the MAXNODE define and
replace it with MAX_NUMNODES everywhere or the constant if the hardware limits
the number of nodes.

Also remove some obsolete comments.
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bd586bc0
......@@ -289,17 +289,15 @@ config HAVE_DEC_LOCK
depends on SMP
default y
# actually 64 maximum, but you need to fix the APIC code first
# to use clustered mode or whatever your big iron needs
config NR_CPUS
int "Maximum number of CPUs (2-8)"
range 2 8
int "Maximum number of CPUs (2-256)"
range 2 256
depends on SMP
default "8"
help
This allows you to specify the maximum number of CPUs which this
kernel will support. The maximum supported value is 32 and the
minimum value which makes sense is 2.
kernel will support. Current maximum is 256 CPUs due to
APIC addressing limits. Less depending on the hardware.
This is purely to save memory - each supported CPU requires
memory in the static kernel configuration.
......
......@@ -43,7 +43,7 @@ static __init int find_northbridge(void)
int __init k8_scan_nodes(unsigned long start, unsigned long end)
{
unsigned long prevbase;
struct node nodes[MAXNODE];
struct node nodes[8];
int nodeid, i, nb;
int found = 0;
u32 reg;
......@@ -149,7 +149,7 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)
}
printk(KERN_INFO "Using node hash shift of %d\n", memnode_shift);
for (i = 0; i < MAXNODE; i++) {
for (i = 0; i < 8; i++) {
if (nodes[i].start != nodes[i].end) {
/* assume 1:1 NODE:CPU */
cpu_to_node[i] = i;
......
......@@ -22,7 +22,7 @@
#define Dprintk(x...)
#endif
struct pglist_data *node_data[MAXNODE];
struct pglist_data *node_data[MAX_NUMNODES];
bootmem_data_t plat_node_bdata[MAX_NUMNODES];
int memnode_shift;
......@@ -30,7 +30,7 @@ u8 memnodemap[NODEMAPSIZE];
#define NUMA_NO_NODE 0xff
unsigned char cpu_to_node[NR_CPUS] = { [0 ... NR_CPUS-1] = NUMA_NO_NODE };
cpumask_t node_to_cpumask[MAXNODE];
cpumask_t node_to_cpumask[MAX_NUMNODES];
int numa_off __initdata;
......@@ -152,7 +152,7 @@ void __init numa_init_array(void)
CPUs, as the number of CPUs is not known yet.
We round robin the existing nodes. */
rr = 0;
for (i = 0; i < MAXNODE; i++) {
for (i = 0; i < MAX_NUMNODES; i++) {
if (node_online(i))
continue;
if (cpu_to_node[i] != NUMA_NO_NODE)
......@@ -175,7 +175,7 @@ int numa_fake __initdata = 0;
static int numa_emulation(unsigned long start_pfn, unsigned long end_pfn)
{
int i;
struct node nodes[MAXNODE];
struct node nodes[MAX_NUMNODES];
unsigned long sz = ((end_pfn - start_pfn)<<PAGE_SHIFT) / numa_fake;
/* Kludge needed for the hash function */
......
......@@ -12,7 +12,6 @@
#include <asm/smp.h>
#define MAXNODE 8
#define NODEMAPSIZE 0xff
/* Simple perfect hash to map physical addresses to node numbers */
......
......@@ -2,9 +2,7 @@
#define _ASM_X8664_NUMA_H 1
#include <linux/nodemask.h>
#define MAXNODE 8
#define NODEMASK 0xff
#include <asm/numnodes.h>
struct node {
u64 start,end;
......
......@@ -3,7 +3,6 @@
#include <linux/config.h>
/* Max 8 Nodes - APIC limit currently */
#define NODES_SHIFT 3
#define NODES_SHIFT 6
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment