Rusty Russell wrote:
>
> This patch introduces the __per_cpu_data tag for data, and the
> per_cpu() & this_cpu() macros to go with it.
>
> This allows us to get rid of all those special case structures
> springing up all over the place for CPU-local data.
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/
This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:58 EST