Re: [PATCH] x86/acpi: Remove indirect jump from wakeup_long64()
From: Brian Gerst
Date: Sun Jan 18 2026 - 14:17:18 EST
On Sun, Jan 18, 2026 at 1:09 PM Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>
> On Sun, 18 Jan 2026 at 18:05, Brian Gerst <brgerst@xxxxxxxxx> wrote:
> >
> > wakeup_long64() is called from common_startup_64() via inital_code, so
>
> initial_code
>
> > it is already running on the normal virtual mapping. There is no need
> > to use an indirect jump since it is not switching mappings.
> >
>
> By the same reasoning (i.e., that everything executes in the kernel
> virtual mapping) you might also convert the movq on line 55 into a
> RIP-relative leaq, as it is the only remaining non-RIP relative access
> in the file. That way, I can drop this file from my PIE series too.
This is more of a general cleanup than specifically for PIE. When
resume was converted to using the SMP trampoline, a lot of the old
cruft was left in place and I am working on additional cleanups.