[PATCH] arm64: Use mov_q to load KPTI_NG_PTE_FLAGS/SWAPPER_R*_MMUFLAGS
Catalin Marinas
catalin.marinas at arm.com
Thu Jul 21 08:21:55 PDT 2022
On Thu, Jul 21, 2022 at 01:42:44PM +0100, Marc Zyngier wrote:
> With f7b4c3b82e7d ("arm64: set UXN on swapper page tables"),
> the kernel fails to build:
>
> arch/arm64/kernel/head.S: Assembler messages:
> arch/arm64/kernel/head.S:334: Error: immediate cannot be moved by a single instruction
> arch/arm64/kernel/head.S:343: Error: immediate cannot be moved by a single instruction
> arch/arm64/kernel/head.S:354: Error: immediate cannot be moved by a single instruction
> arch/arm64/kernel/head.S:379: Error: immediate cannot be moved by a single instruction
>
> as the constants that inherit SWAPPER_P*_FLAGS cannot be loaded
> using a single 'mov' instruction. Move over to mov_q to fix this.
>
> Signed-off-by: Marc Zyngier <maz at kernel.org>
Thanks for the fix Marc, this only applies to -next. We could either
revert Peter's patch [1] in -next but keep it for 5.19 or simply drop it
from for-next/fixes and send it to stable post 5.19. I'm more inclined
to do the latter.
Catalin
[1] https://lore.kernel.org/r/20220719234909.1398992-1-pcc@google.com
More information about the linux-arm-kernel
mailing list