Commit d9432bd8 authored by Alex Williamson's avatar Alex Williamson Committed by David Mosberger

[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.
parent 1b0bf596
...@@ -186,7 +186,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len, ...@@ -186,7 +186,7 @@ static int __init find_pernode_space(unsigned long start, unsigned long len,
*/ */
for (cpu = 0; cpu < NR_CPUS; cpu++) { for (cpu = 0; cpu < NR_CPUS; cpu++) {
if (node == node_cpuid[cpu].nid) { 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_end-__per_cpu_start);
__per_cpu_offset[cpu] = __per_cpu_offset[cpu] =
(char*)__va(cpu_data) - (char*)__va(cpu_data) -
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#ifdef CONFIG_IA64_DIG #ifdef CONFIG_IA64_DIG
/* Max 8 Nodes */ /* Max 8 Nodes */
#define NODES_SHIFT 3 #define NODES_SHIFT 3
#elif defined(CONFIG_IA64_SGI_SN2) #elif defined(CONFIG_IA64_SGI_SN2) || defined(CONFIG_IA64_GENERIC)
/* Max 128 Nodes */ /* Max 128 Nodes */
#define NODES_SHIFT 7 #define NODES_SHIFT 7
#endif #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