lkml.org 
[lkml]   [2009]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 7/8] x86, smpboot: use zalloc_cpumask_var instead of alloc/clear

    Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
    ---
    arch/x86/kernel/smpboot.c | 12 ++++--------
    1 files changed, 4 insertions(+), 8 deletions(-)

    diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
    index f50af56..f797214 100644
    --- a/arch/x86/kernel/smpboot.c
    +++ b/arch/x86/kernel/smpboot.c
    @@ -1068,14 +1068,10 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
    #endif
    current_thread_info()->cpu = 0; /* needed? */
    for_each_possible_cpu(i) {
    - alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
    - alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
    - alloc_cpumask_var(&per_cpu(cpu_node_map, i), GFP_KERNEL);
    - alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL);
    - cpumask_clear(per_cpu(cpu_core_map, i));
    - cpumask_clear(per_cpu(cpu_node_map, i));
    - cpumask_clear(per_cpu(cpu_sibling_map, i));
    - cpumask_clear(cpu_data(i).llc_shared_map);
    + zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
    + zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
    + zalloc_cpumask_var(&per_cpu(cpu_node_map, i), GFP_KERNEL);
    + zalloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL);
    }
    set_cpu_sibling_map(0);

    --
    1.6.3.3




    \
     
     \ /
      Last update: 2009-08-07 15:09    [W:0.022 / U:2.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site