lkml.org 
[lkml]   [2012]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86
    On Sat, Feb 11, 2012 at 10:18:53PM -0400, Kevin Winchester wrote:
    > > @@ -225,7 +225,6 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
    > >        for_each_possible_cpu(i) {
    > >                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_llc_shared_map, i), GFP_KERNEL);
    > >        }
    > >        set_cpu_sibling_map(0);
    > >
    >
    > I just realized that I took out a couple of allocations here for
    > cpu_llc_shared_map, without replacing them. Am I leaving
    > cpuinfo_x86.llc_shared_map unallocated then, and just writing to
    > whatever address that field happened to get?

    AFAICT, yes, you need to alloc the cpumask too, i.e. something like

    zalloc_cpumask_var(cpu_info(i).llc_shared_map, GFP_KERNEL);

    assuming this happens before the cpumask gets initted in
    set_cpu_sibling_map() et al. Just give the whole init path a hard
    staring, and try to figure out the proper init sequence.

    HTH.

    P.S.: I'm currently travelling but will give your patch a run when I get
    back, thanks.

    --
    Regards/Gruss,
    Boris.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-02-12 12:25    [W:0.023 / U:2.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site