[PATCH] arm64: Use mov_q to load KPTI_NG_PTE_FLAGS/SWAPPER_R*_MMUFLAGS

Marc Zyngier maz at kernel.org
Thu Jul 21 09:10:46 PDT 2022


On Thu, 21 Jul 2022 16:21:55 +0100,
Catalin Marinas <catalin.marinas at arm.com> wrote:
> 
> 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.

Agreed, this seems like a sensible decision. This is unlikely to
affect a large user base at this stage anyway.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list