direct-io.hg

changeset 15246:4eb223694d0a

x86: Remove broken and unnecessary numa code from smpboot.c.
This was trampling on random memory when node==NUMA_NO_NODE.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Sun Jun 10 18:07:58 2007 +0100 (2007-06-10)
parents 608ddb14259b
children ac9d3bcc7a78
files xen/arch/x86/smpboot.c
line diff
     1.1 --- a/xen/arch/x86/smpboot.c	Sun Jun 10 17:00:47 2007 +0100
     1.2 +++ b/xen/arch/x86/smpboot.c	Sun Jun 10 18:07:58 2007 +0100
     1.3 @@ -543,40 +543,6 @@ extern struct {
     1.4  	unsigned short ss;
     1.5  } stack_start;
     1.6  
     1.7 -#ifdef CONFIG_NUMA
     1.8 -
     1.9 -/* which logical CPUs are on which nodes */
    1.10 -cpumask_t node_2_cpu_mask[MAX_NUMNODES] __read_mostly =
    1.11 -				{ [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE };
    1.12 -/* which node each logical CPU is on */
    1.13 -int cpu_2_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 };
    1.14 -EXPORT_SYMBOL(cpu_2_node);
    1.15 -
    1.16 -/* set up a mapping between cpu and node. */
    1.17 -static inline void map_cpu_to_node(int cpu, int node)
    1.18 -{
    1.19 -	printk("Mapping cpu %d to node %d\n", cpu, node);
    1.20 -	cpu_set(cpu, node_2_cpu_mask[node]);
    1.21 -	cpu_2_node[cpu] = node;
    1.22 -}
    1.23 -
    1.24 -/* undo a mapping between cpu and node. */
    1.25 -static inline void unmap_cpu_to_node(int cpu)
    1.26 -{
    1.27 -	int node;
    1.28 -
    1.29 -	printk("Unmapping cpu %d from all nodes\n", cpu);
    1.30 -	for (node = 0; node < MAX_NUMNODES; node ++)
    1.31 -		cpu_clear(cpu, node_2_cpu_mask[node]);
    1.32 -	cpu_2_node[cpu] = 0;
    1.33 -}
    1.34 -#else /* !CONFIG_NUMA */
    1.35 -
    1.36 -#define map_cpu_to_node(cpu, node)	({})
    1.37 -#define unmap_cpu_to_node(cpu)	({})
    1.38 -
    1.39 -#endif /* CONFIG_NUMA */
    1.40 -
    1.41  u8 cpu_2_logical_apicid[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID };
    1.42  
    1.43  static void map_cpu_to_logical_apicid(void)
    1.44 @@ -585,13 +551,11 @@ static void map_cpu_to_logical_apicid(vo
    1.45  	int apicid = hard_smp_processor_id();
    1.46  
    1.47  	cpu_2_logical_apicid[cpu] = apicid;
    1.48 -	map_cpu_to_node(cpu, apicid_to_node(apicid));
    1.49  }
    1.50  
    1.51  static void unmap_cpu_to_logical_apicid(int cpu)
    1.52  {
    1.53  	cpu_2_logical_apicid[cpu] = BAD_APICID;
    1.54 -	unmap_cpu_to_node(cpu);
    1.55  }
    1.56  
    1.57  #if APIC_DEBUG