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

Laurent Dufour posted 1 patch 3 years, 11 months ago
There is a newer version of this series
arch/powerpc/platforms/pseries/setup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode
Posted by Laurent Dufour 3 years, 11 months ago
There is no need to read the H_BLOCK_REMOVE characteristics when running in
Radix mode because this hcall is never called.

Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
---
 arch/powerpc/platforms/pseries/setup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index c9fcc30a0365..654d2b999c25 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -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) */
-- 
2.36.1
Re: [PATCH] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode
Posted by Christophe Leroy 3 years, 11 months ago

Le 20/05/2022 à 17:57, Laurent Dufour a écrit :
> There is no need to read the H_BLOCK_REMOVE characteristics when running in
> Radix mode because this hcall is never called.
> 
> Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
> ---
>   arch/powerpc/platforms/pseries/setup.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
> index c9fcc30a0365..654d2b999c25 100644
> --- a/arch/powerpc/platforms/pseries/setup.c
> +++ b/arch/powerpc/platforms/pseries/setup.c
> @@ -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.

>   
>   	/* By default, only probe PCI (can be overridden by rtas_pci) */
Re: [PATCH] powerpc/64s: Don't read H_BLOCK_REMOVE characteristics in radix mode
Posted by Laurent Dufour 3 years, 11 months ago
On 20/05/2022, 18:15:39, Christophe Leroy wrote:
> 
> 
> Le 20/05/2022 à 17:57, Laurent Dufour a écrit :
>> There is no need to read the H_BLOCK_REMOVE characteristics when running in
>> Radix mode because this hcall is never called.
>>
>> Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
>> ---
>>   arch/powerpc/platforms/pseries/setup.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
>> index c9fcc30a0365..654d2b999c25 100644
>> --- a/arch/powerpc/platforms/pseries/setup.c
>> +++ b/arch/powerpc/platforms/pseries/setup.c
>> @@ -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.

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

>>   
>>   	/* By default, only probe PCI (can be overridden by rtas_pci) */