I don't think there's a need. You can use .data.percpu directly
for the boot CPU, dynamically allocate storage for the others.
This actually saves one CPU's worth of memory :)
> Do you have an example where you want to use this before
> smp_boot_cpus()? If so, we can bite the bullet. Otherwise I'd prefer
> not to waste memory.
Well, the slab allocator uses per-CPU data, so with the current patch,
slab.c wouldn't be able to use per_cpu().
But if you use:
unsigned long __per_cpu_offset[NR_CPUS] = { (unsigned long *)&__per_cpu_start, };
Then each CPU has, at all times, a valid personal __per_cpu_offset[]
entry. The only restriction is that the boot CPU cannot
touch other CPU's per-cpu data before those CPUs are brought
up.
-
-
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/