* [PATCH v1] arm64: mm: fix resume for 52-bit enabled builds
@ 2022-09-09 8:38 Joey Gouly
2022-09-09 9:11 ` Ard Biesheuvel
2022-09-09 10:23 ` Will Deacon
0 siblings, 2 replies; 3+ messages in thread
From: Joey Gouly @ 2022-09-09 8:38 UTC (permalink / raw)
To: linux-arm-kernel; +Cc: nd, ardb, catalin.marinas, will, Joey Gouly
__cpu_setup() was changed to take the actual number of VA bits in x0,
however the resume path was not updated at the same time.
Load `vabits_actual` in the resume path, to ensure that the correct
number of VA bits is used.
This fixes booting v6.0-rc kernels on my Juno.
Fixes: 0aaa68532e9d ("arm64: mm: fix booting with 52-bit address space")
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
---
arch/arm64/kernel/sleep.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/sleep.S b/arch/arm64/kernel/sleep.S
index 617f78ad43a1..97c9de57725d 100644
--- a/arch/arm64/kernel/sleep.S
+++ b/arch/arm64/kernel/sleep.S
@@ -101,6 +101,9 @@ SYM_FUNC_END(__cpu_suspend_enter)
SYM_CODE_START(cpu_resume)
bl init_kernel_el
bl finalise_el2
+#if VA_BITS > 48
+ ldr_l x0, vabits_actual
+#endif
bl __cpu_setup
/* enable the MMU early - so we can access sleep_save_stash by va */
adrp x1, swapper_pg_dir
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1] arm64: mm: fix resume for 52-bit enabled builds
2022-09-09 8:38 [PATCH v1] arm64: mm: fix resume for 52-bit enabled builds Joey Gouly
@ 2022-09-09 9:11 ` Ard Biesheuvel
2022-09-09 10:23 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2022-09-09 9:11 UTC (permalink / raw)
To: Joey Gouly; +Cc: linux-arm-kernel, nd, catalin.marinas, will
On Fri, 9 Sept 2022 at 10:38, Joey Gouly <joey.gouly@arm.com> wrote:
>
> __cpu_setup() was changed to take the actual number of VA bits in x0,
> however the resume path was not updated at the same time.
>
> Load `vabits_actual` in the resume path, to ensure that the correct
> number of VA bits is used.
>
> This fixes booting v6.0-rc kernels on my Juno.
>
> Fixes: 0aaa68532e9d ("arm64: mm: fix booting with 52-bit address space")
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
Yup. I missed that one - thanks for fixing it.
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> arch/arm64/kernel/sleep.S | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/kernel/sleep.S b/arch/arm64/kernel/sleep.S
> index 617f78ad43a1..97c9de57725d 100644
> --- a/arch/arm64/kernel/sleep.S
> +++ b/arch/arm64/kernel/sleep.S
> @@ -101,6 +101,9 @@ SYM_FUNC_END(__cpu_suspend_enter)
> SYM_CODE_START(cpu_resume)
> bl init_kernel_el
> bl finalise_el2
> +#if VA_BITS > 48
> + ldr_l x0, vabits_actual
> +#endif
> bl __cpu_setup
> /* enable the MMU early - so we can access sleep_save_stash by va */
> adrp x1, swapper_pg_dir
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] arm64: mm: fix resume for 52-bit enabled builds
2022-09-09 8:38 [PATCH v1] arm64: mm: fix resume for 52-bit enabled builds Joey Gouly
2022-09-09 9:11 ` Ard Biesheuvel
@ 2022-09-09 10:23 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2022-09-09 10:23 UTC (permalink / raw)
To: Joey Gouly; +Cc: linux-arm-kernel, nd, ardb, catalin.marinas
Hi Joey,
On Fri, Sep 09, 2022 at 09:38:11AM +0100, Joey Gouly wrote:
> __cpu_setup() was changed to take the actual number of VA bits in x0,
> however the resume path was not updated at the same time.
>
> Load `vabits_actual` in the resume path, to ensure that the correct
> number of VA bits is used.
>
> This fixes booting v6.0-rc kernels on my Juno.
>
> Fixes: 0aaa68532e9d ("arm64: mm: fix booting with 52-bit address space")
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Ard Biesheuvel <ardb@kernel.org>
I can't apply this without your SoB line.
I think you made this mistake in the past, so please could you try to
fix your setup? There's probably a better way to do this, but I up having:
[commit]
template = ~/linux-commit.template
in my .gitconfig, and then I put the SoB line in the template so it's
always there when I start writing the commit message.
Cheers,
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-09 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-09 8:38 [PATCH v1] arm64: mm: fix resume for 52-bit enabled builds Joey Gouly
2022-09-09 9:11 ` Ard Biesheuvel
2022-09-09 10:23 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox