[PATCH] x86: print per_cpu data address - Kernel

This is a discussion on [PATCH] x86: print per_cpu data address - Kernel ; to make sure per_cpu data on correct node. Signed-off-by: Yinghai Lu --- arch/x86/kernel/setup_percpu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) Index: linux-2.6/arch/x86/kernel/setup_percpu.c ================================================== ================= --- linux-2.6.orig/arch/x86/kernel/setup_percpu.c +++ linux-2.6/arch/x86/kernel/setup_percpu.c @@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void) printk(KERN_INFO "cpu ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] x86: print per_cpu data address

  1. [PATCH] x86: print per_cpu data address


    to make sure per_cpu data on correct node.

    Signed-off-by: Yinghai Lu

    ---
    arch/x86/kernel/setup_percpu.c | 9 ++++++++-
    1 file changed, 8 insertions(+), 1 deletion(-)

    Index: linux-2.6/arch/x86/kernel/setup_percpu.c
    ================================================== =================
    --- linux-2.6.orig/arch/x86/kernel/setup_percpu.c
    +++ linux-2.6/arch/x86/kernel/setup_percpu.c
    @@ -162,9 +162,16 @@ void __init setup_per_cpu_areas(void)
    printk(KERN_INFO
    "cpu %d has no node %d or node-local memory\n",
    cpu, node);
    + if (ptr)
    + printk(KERN_DEBUG "per cpu data for cpu%d at %016lx\n",
    + cpu, __pa(ptr));
    }
    - else
    + else {
    ptr = alloc_bootmem_pages_node(NODE_DATA(node), size);
    + if (ptr)
    + printk(KERN_DEBUG "per cpu data for cpu%d on node%d at %016lx\n",
    + cpu, node, __pa(ptr));
    + }
    #endif
    per_cpu_offset(cpu) = ptr - __per_cpu_start;
    memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
    --
    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/

  2. Re: [PATCH] x86: print per_cpu data address


    * Yinghai Lu wrote:

    > to make sure per_cpu data on correct node.
    >
    > Signed-off-by: Yinghai Lu


    applied to tip/x86/debug - thanks Yinghai.

    Ingo
    --
    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/

+ Reply to Thread