Am I missing something? smp_init() is called quite late in
the boot process, and if any code touches per-cpu data before
this, it'll get a null pointer deref, won't it?
You could possibly do:
unsigned long __per_cpu_offset[NR_CPUS] = { (unsigned long *)&__per_cpu_start, };
which takes care of the boot processor. You lose the ability
to put statically initialised data into the per-cpu area, but
that's not too bad.
Also the boot processor won't be able to initialise stuff which
belongs to other CPUs.
Or the whole thing needs to be moved super-early into the boot
process.
Or I missed something :)
-
-
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/