lkml.org 
[lkml]   [2002]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] per-cpu areas for 2.5.3-pre6
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:15    [W:3.343 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site