lkml.org 
[lkml]   [2008]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into per cpu area
Jeremy Fitzhardinge wrote:
> Mike Travis wrote:
>> The syntax error is at this "DATA(0)" statement. I don't find this as a
>> linker script command or a macro. What is it we're trying to do with
>> this?
>>
>
> In Eric's sample, it's intended to prevent there being an empty section,
> which can cause linker bugs. In your case it probably isn't necessary,
> since you're also putting the percpu data in that section.
>
> "DATA" is probably a typo. It should be "LONG" or something like that.
> (See "3.6.5 Output Section Data" in the linker manual.)
>
> J

Yes, thanks I did find that.

I now have the version below which seems to have what we need... but it
hasn't had an effect on the boot startup panic. I'm back to verifying
that the assembler effective addresses are correct in the loaded object.

ffffffff81911000 D __per_cpu_load
0000000000000000 D per_cpu__pda
0000000000000080 D per_cpu__init_tss
.
.
000000000000a2d0 d per_cpu__cookie_scratch
000000000000a470 d per_cpu__cookie_scratch
000000000000a604 D ____per_cpu_size

Btw, the "percpu : { } :percpu" below removes a linker warning about an empty
section.

#ifdef CONFIG_HAVE_ZERO_BASED_PER_CPU
#define PERCPU(align) \
.data.percpu.abs = .; \
percpu : { } :percpu \
.data.percpu.header : AT(.data.percpu.abs - LOAD_OFFSET) { \
BYTE(0) \
. = ALIGN(align); \
__per_cpu_load = .; \
} \
.data.percpu 0 : AT(__per_cpu_load - LOAD_OFFSET) { \
*(.data.percpu.first) \
*(.data.percpu.shared_aligned) \
*(.data.percpu) \
*(.data.percpu.page_aligned) \
____per_cpu_size = .; \
} \
. = __per_cpu_load + ____per_cpu_size;


\
 
 \ /
  Last update: 2008-06-24 02:05    [W:0.025 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site