Skip to contentSkip to conversation

powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode

PATCH Applied Laurent Dufour 2 participants 2 messages May 23, 2022 – Jul 4, 2022 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode

There is no need to read the H_BLOCK_REMOVE characteristics when running in Radix mode because this hcall is never called.

Furthermore since the commit 387e220a2e5e ("powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU") define pseries_lpar_read_hblkrm_characteristics as un empty function if CONFIG_PPC_64S_HASH_MMU is not set, the #ifdef block can be removed.

Cc Nicholas Piggin <[email protected]>
Cc Christophe Leroy <[email protected]>
---
 arch/powerpc/platforms/pseries/setup.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/powerpc/platforms/pseries/setup.c +2 -3
index c9fcc30a0365..6d7d31d8099d 100644
@@ -802,9 +802,8 @@ static void __init pSeries_setup_arch(void)
 	fwnmi_init();
 
 	pseries_setup_security_mitigations();
-#ifdef CONFIG_PPC_64S_HASH_MMU
-	pseries_lpar_read_hblkrm_characteristics();
-#endif
+	if (!radix_enabled())
+		pseries_lpar_read_hblkrm_characteristics();
 
 	/* By default, only probe PCI (can be overridden by rtas_pci) */
 	pci_add_flags(PCI_PROBE_ONLY);
Signature · 1 line
2.36.1
#1 lore raw
Quoted 9 lines · Laurent Dufour

There is no need to read the H_BLOCK_REMOVE characteristics when running in Radix mode because this hcall is never called.

Furthermore since the commit 387e220a2e5e ("powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU") define pseries_lpar_read_hblkrm_characteristics as un empty function if CONFIG_PPC_64S_HASH_MMU is not set, the #ifdef block can be removed.

[...]

Applied to powerpc/next.

[1/1] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode

      https://git.kernel.org/powerpc/c/61bdbca855024997fd8c82dc190f458aa81beca8

cheers