<br><font size=2 face="sans-serif">Olaf,</font>
<br><font size=2 face="sans-serif">        I
was looking in 2.6.16-rc5-git8, but did not find the patch that you mentioned.</font>
<br>
<br>
<br><font size=2 face="sans-serif">arch/powerpc/kernel/setup_64.c:</font>
<br>
<br><font size=2 face="sans-serif">#ifdef CONFIG_SMP</font>
<br><font size=2 face="sans-serif">void __init setup_per_cpu_areas(void)</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif">        int i;</font>
<br><font size=2 face="sans-serif">        unsigned
long size;</font>
<br><font size=2 face="sans-serif">        char *ptr;</font>
<br>
<br><font size=2 face="sans-serif">        /* Copy
section for each CPU (we discard the original) */</font>
<br><font size=2 face="sans-serif">        size = ALIGN(__per_cpu_end
- __per_cpu_start, SMP_CACHE_BYTES);</font>
<br><font size=2 face="sans-serif">#ifdef CONFIG_MODULES</font>
<br><font size=2 face="sans-serif">        if (size
< PERCPU_ENOUGH_ROOM)</font>
<br><font size=2 face="sans-serif">           
    size = PERCPU_ENOUGH_ROOM;</font>
<br><font size=2 face="sans-serif">#endif</font>
<br>
<br><font size=2 face="sans-serif">        for_each_cpu(i)
{</font>
<br><font size=2 face="sans-serif">           
    ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);</font>
<br><font size=2 face="sans-serif">           
    if (!ptr)</font>
<br><font size=2 face="sans-serif">           
            panic("Cannot allocate cpu
data for CPU %d\n", i);</font>
<br>
<br><font size=2 face="sans-serif">           
    paca[i].data_offset = ptr - __per_cpu_start;</font>
<br><font size=2 face="sans-serif">           
    memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);</font>
<br><font size=2 face="sans-serif">     }</font>
<br><font size=2 face="sans-serif">}</font>
<br>
<br>
<br><font size=2 face="sans-serif"> Instead of depending on paca[#].data_offset,
my fix will use cpu_online_map to read the valid cpu paca structs. But,
if the kernel sets 0xeeeeeeeeeeeeeeeeULL, yes, using this value will be
the better solution.</font><font size=3><tt> </tt></font>
<br>
<br><font size=2><tt>Dave, the attached patch contains both fixes that
Rachita reported.</tt></font>
<br><font size=2><tt>        - Report an error
message if the thread is running in user space and print regs.</tt></font>
<br><font size=2><tt>        - Finding the
valid per_cpu_offset values</tt></font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br><font size=2 face="sans-serif">Haren</font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>crash-utility-bounces@redhat.com wrote on 03/09/2006
01:15:56 AM:<br>
<br>
> <br>
> We use this patch to catch incorrect access to per_cpu data. But crash<br>
> cant deal with it unfortunately.<br>
> <br>
> http://patchwork.ozlabs.org/linuxppc/patch?id=4423<br>
> <br>
> honeydew:~ # crash -s /root/2.6.15.42-kexec/vmlinux /proc/vmcore<br>
> crash: pglist_data.node_mem_map structure member does not exist.<br>
> crash: certain memory-related commands will fail or display invalid
data<br>
> <br>
> crash: invalid kernel virtual address: aeeeeeeeef3736ae  type:
<br>
> "runqueues entry (per_cpu)"<br>
> <br>
> --<br>
> Crash-utility mailing list<br>
> Crash-utility@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/crash-utility<br>
</tt></font>