From d9432bd8ddb1f9f3cd1e7e1b20938c183f343a21 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Wed, 22 Oct 2003 02:52:04 -0700 Subject: [PATCH] [PATCH] ia64: trivial ia64 numa/discontig fixes I stumbled on a couple trivial bugs in ia64 numa/discontig support. The first just sets the default number of nodes to something reasonable for a generic kernel, otherwise it's really easy to start walking over your initdata (more error checking should probably be added). The second fixes a memcpy to a physical address. --- arch/ia64/mm/discontig.c | 2 +- include/asm-ia64/numnodes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 25c8151d16d0d..de591fb14042c 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -186,7 +186,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len, */ for (cpu = 0; cpu < NR_CPUS; cpu++) { if (node == node_cpuid[cpu].nid) { - memcpy(cpu_data, __phys_per_cpu_start, + memcpy(__va(cpu_data), __phys_per_cpu_start, __per_cpu_end-__per_cpu_start); __per_cpu_offset[cpu] = (char*)__va(cpu_data) - diff --git a/include/asm-ia64/numnodes.h b/include/asm-ia64/numnodes.h index 3b71511f5d2ba..f0f167b09807b 100644 --- a/include/asm-ia64/numnodes.h +++ b/include/asm-ia64/numnodes.h @@ -4,7 +4,7 @@ #ifdef CONFIG_IA64_DIG /* Max 8 Nodes */ #define NODES_SHIFT 3 -#elif defined(CONFIG_IA64_SGI_SN2) +#elif defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_GENERIC) /* Max 128 Nodes */ #define NODES_SHIFT 7 #endif -- 2.53.0