lkml.org 
[lkml]   [2010]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 15/16] x86: Unify node_to_cpumask_map handling between 32 and 64bit
    On Tue, 28 Dec 2010, Tejun Heo wrote:

    > diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
    > index ce33f69..6013aca 100644
    > --- a/arch/x86/mm/numa_64.c
    > +++ b/arch/x86/mm/numa_64.c
    > @@ -730,58 +730,3 @@ int __cpuinit numa_cpu_node(int cpu)
    > return __apicid_to_node[apicid];
    > return NUMA_NO_NODE;
    > }
    > -
    > -#ifndef CONFIG_DEBUG_PER_CPU_MAPS
    > -
    > -void __cpuinit numa_add_cpu(int cpu)
    > -{
    > - cpumask_set_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]);
    > -}
    > -
    > -void __cpuinit numa_remove_cpu(int cpu)
    > -{
    > - cpumask_clear_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]);
    > -}
    > -
    > -#else /* CONFIG_DEBUG_PER_CPU_MAPS */
    > -
    > -/*
    > - * --------- debug versions of the numa functions ---------
    > - */
    > -static void __cpuinit numa_set_cpumask(int cpu, int enable)
    > -{
    > - int node = early_cpu_to_node(cpu);
    > - struct cpumask *mask;
    > - char buf[64];
    > -
    > - mask = node_to_cpumask_map[node];
    > - if (mask == NULL) {
    > - printk(KERN_ERR "node_to_cpumask_map[%i] NULL\n", node);
    > - dump_stack();
    > - return;
    > - }
    > -
    > - if (enable)
    > - cpumask_set_cpu(cpu, mask);
    > - else
    > - cpumask_clear_cpu(cpu, mask);
    > -
    > - cpulist_scnprintf(buf, sizeof(buf), mask);
    > - printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n",
    > - enable ? "numa_add_cpu" : "numa_remove_cpu", cpu, node, buf);
    > -}
    > -
    > -void __cpuinit numa_add_cpu(int cpu)
    > -{
    > - numa_set_cpumask(cpu, 1);
    > -}
    > -
    > -void __cpuinit numa_remove_cpu(int cpu)
    > -{
    > - numa_set_cpumask(cpu, 0);
    > -}
    > -/*
    > - * --------- end of debug versions of the numa functions ---------
    > - */
    > -
    > -#endif /* CONFIG_DEBUG_PER_CPU_MAPS */

    This has been almost entirely rewritten in x86/numa by c1c3443c ("x86,
    numa: Fake node-to-cpumask for NUMA emulation") and the pending fix
    http://marc.info/?l=linux-kernel&m=129340072128297 ("x86, numa: Fix
    CONFIG_DEBUG_PER_CPU_MAPS without NUMA"). Since this is only moving those
    functions to numa.c, it should be trivial to fix once based on x86/numa.


    \
     
     \ /
      Last update: 2010-12-28 21:45    [W:0.028 / U:10.116 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site