Skip to contentSkip to conversation

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

PATCH Superseded Laurent Dufour 2 participants 3 messages May 20, 2022 – May 23, 2022 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 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.

---
 arch/powerpc/platforms/pseries/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/setup.c +2 -1
index c9fcc30a0365..654d2b999c25 100644
@@ -803,7 +803,8 @@ static void __init pSeries_setup_arch(void)
 
 	pseries_setup_security_mitigations();
 #ifdef CONFIG_PPC_64S_HASH_MMU
-	pseries_lpar_read_hblkrm_characteristics();
+	if (!radix_enabled())
+		pseries_lpar_read_hblkrm_characteristics();
 #endif
 
 	/* By default, only probe PCI (can be overridden by rtas_pci) */
Signature · 1 line
2.36.1
#1 lore raw

Le 20/05/2022 à 17:57, Laurent Dufour a écrit :

Quoted 13 lines

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

---
  arch/powerpc/platforms/pseries/setup.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/setup.c +0 -0
index c9fcc30a0365..654d2b999c25 100644

arch/powerpc/platforms/pseries/setup.c static void __init pSeries_setup_arch(void) · line 808

Quoted 7 lines
arch/powerpc/platforms/pseries/setup.c +2 -1
@@ -803,7 +803,8 @@ static void __init pSeries_setup_arch(void)
 
  	pseries_setup_security_mitigations();
  #ifdef CONFIG_PPC_64S_HASH_MMU
-	pseries_lpar_read_hblkrm_characteristics();
+	if (!radix_enabled())
+		pseries_lpar_read_hblkrm_characteristics();
  #endif

As far as I can see the function always exists so the #ifdef can be removed.

Quoted 2 lines
arch/powerpc/platforms/pseries/setup.c +0 -0
  	/* By default, only probe PCI (can be overridden by rtas_pci) */
#2 lore raw
Quoted 17 lines · Christophe Leroy

Le 20/05/2022 à 17:57, Laurent Dufour a écrit :

Quoted 14 lines

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

---
  arch/powerpc/platforms/pseries/setup.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/setup.c +0 -0
index c9fcc30a0365..654d2b999c25 100644
@@ -803,7 +803,8 @@ static void __init pSeries_setup_arch(void)
 
Quoted 8 lines

arch/powerpc/platforms/pseries/setup.c static void __init pSeries_setup_arch(void) · line 808

Quoted 6 lines
arch/powerpc/platforms/pseries/setup.c +2 -1
  	pseries_setup_security_mitigations();
  #ifdef CONFIG_PPC_64S_HASH_MMU
-	pseries_lpar_read_hblkrm_characteristics();
+	if (!radix_enabled())
+		pseries_lpar_read_hblkrm_characteristics();
  #endif

As far as I can see the function always exists so the #ifdef can be removed.

You're right, I'll do that in the v2

Quoted 2 lines
Quoted 2 lines
arch/powerpc/platforms/pseries/setup.c +0 -0
  	/* By default, only probe PCI (can be overridden by rtas_pci) */