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

From: Jeremy Fitzhardinge
Date: Thu Jun 19 2008 - 18:22:22 EST


Mike Travis wrote:
Jeremy Fitzhardinge wrote:

Why not use the real pda for all cpus?

Yeah, I figured that out after doing some more thinking... ;-)

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.

The problem is that the static percpu area is removed as it lies
in the initdata section, so the pda is removed as well.

Well, that's easy to fix...

But I took your suggestion to move the fixup to before secondary_startup.

Below is a revised version.

(Incremental diffs are easier to review and work with.)

It builds but I'll have to test it tomorrow.
Note the addition of:

+ initial_pda = (unsigned long)get_percpu_pda(cpu);

in do_boot_cpu.

I'm not sure yet what to put into acpi_save_state_mem:

initial_code = (unsigned long)wakeup_long64;
+ /* ZZZ initial_pda = (unsigned long)?; */

You'll need to change wakeup_long64 to load the right value into the GS_BASE msr anyway.

J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/