linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode
@ 2022-05-23 16:43 Laurent Dufour
  2022-07-04 11:33 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Dufour @ 2022-05-23 16:43 UTC (permalink / raw)
  To: mpe
  Cc: aneesh.kumar, linuxppc-dev, linux-kernel, Nicholas Piggin,
	Christophe Leroy

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 <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
---
 arch/powerpc/platforms/pseries/setup.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index c9fcc30a0365..6d7d31d8099d 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -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);
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode
  2022-05-23 16:43 [PATCH v2] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode Laurent Dufour
@ 2022-07-04 11:33 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-07-04 11:33 UTC (permalink / raw)
  To: mpe, Laurent Dufour
  Cc: aneesh.kumar, Nicholas Piggin, linuxppc-dev, Christophe Leroy,
	linux-kernel

On Mon, 23 May 2022 18:43:53 +0200, Laurent Dufour wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-04 11:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 16:43 [PATCH v2] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode Laurent Dufour
2022-07-04 11:33 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).