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.
But I took your suggestion to move the fixup to before secondary_startup.
Below is a revised version.
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)?; */