[lkml]   [2012]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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.


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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-02-12 12:25    [W:0.102 / U:1.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site