Re: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into per cpu area

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mike Travis <travis@...>
Cc: Rusty Russell <rusty@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Thursday, June 19, 2008 - 5:35 pm

Mike Travis wrote:

Why not use the real pda for all cpus?

Do you move the boot-cpu's per-cpu data? (Please don't)  If not, you can 
just use percpu__pda from the start without having to do anything else, 
and then set up %gs pointing to the pda base for each secondary cpu.

64-bit inherits 32-bit's use of per-cpu gdts, though its mostly useless 
on 64-bit.

More important is to have a:

startup_percpu_base:	.quad	__per_cpu_load

which you stick the processor's initial %gs into, and then load that 
from in startup_secondary_64:

	mov	$X86_MSR_GSBASE, %ecx
	mov	startup_percpu_base, %eax
	mov	startup_percpu_base+4, %edx
	wrmsr

and put

	startup_percpu_base = new_cpus_percpu_base;

in do_cpu_boot().


Don't think so.  If you want something to happen only at boot time, do 
it in startup_64.


As I mentioned in my other mail, a simple add should be enough.


Right, do it in startup_64.


It should be possible to share almost everything, at least in C.

    J
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into ..., Jeremy Fitzhardinge, (Thu Jun 19, 5:35 pm)
Re: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into ..., Jeremy Fitzhardinge, (Thu Jun 19, 6:23 pm)
Re: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into ..., Jeremy Fitzhardinge, (Thu Jun 19, 6:21 pm)
Re: [crash, bisected] Re: [PATCH 3/4] x86_64: Fold pda into ..., Jeremy Fitzhardinge, (Thu Jun 19, 5:54 pm)