arm64: paravirt: remove conduit check in has_pv_steal_clock

Message ID 20221104061659.4116508-1-usama.arif@bytedance.com
State New
Headers
Series arm64: paravirt: remove conduit check in has_pv_steal_clock |

Commit Message

Usama Arif Nov. 4, 2022, 6:16 a.m. UTC
  arm_smccc_1_1_invoke() which is called later on in the function
will return failure if there's no conduit (or pre-SMCCC 1.1),
hence the check is unnecessary.

Suggested-by: Steven Price <steven.price@arm.com>
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
---
 arch/arm64/kernel/paravirt.c | 4 ----
 1 file changed, 4 deletions(-)
  

Comments

Steven Price Nov. 4, 2022, 9:13 a.m. UTC | #1
On 04/11/2022 06:16, Usama Arif wrote:
> arm_smccc_1_1_invoke() which is called later on in the function
> will return failure if there's no conduit (or pre-SMCCC 1.1),
> hence the check is unnecessary.
> 
> Suggested-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Usama Arif <usama.arif@bytedance.com>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>  arch/arm64/kernel/paravirt.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/arch/arm64/kernel/paravirt.c b/arch/arm64/kernel/paravirt.c
> index 57c7c211f8c7..aa718d6a9274 100644
> --- a/arch/arm64/kernel/paravirt.c
> +++ b/arch/arm64/kernel/paravirt.c
> @@ -141,10 +141,6 @@ static bool __init has_pv_steal_clock(void)
>  {
>  	struct arm_smccc_res res;
>  
> -	/* To detect the presence of PV time support we require SMCCC 1.1+ */
> -	if (arm_smccc_1_1_get_conduit() == SMCCC_CONDUIT_NONE)
> -		return false;
> -
>  	arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
>  			     ARM_SMCCC_HV_PV_TIME_FEATURES, &res);
>
  
Will Deacon Nov. 9, 2022, 7:14 p.m. UTC | #2
On Fri, 4 Nov 2022 06:16:59 +0000, Usama Arif wrote:
> arm_smccc_1_1_invoke() which is called later on in the function
> will return failure if there's no conduit (or pre-SMCCC 1.1),
> hence the check is unnecessary.
> 
> 

Applied to arm64 (for-next/trivial), thanks!

[1/1] arm64: paravirt: remove conduit check in has_pv_steal_clock
      https://git.kernel.org/arm64/c/1e55b44d9ecd

Cheers,
  

Patch

diff --git a/arch/arm64/kernel/paravirt.c b/arch/arm64/kernel/paravirt.c
index 57c7c211f8c7..aa718d6a9274 100644
--- a/arch/arm64/kernel/paravirt.c
+++ b/arch/arm64/kernel/paravirt.c
@@ -141,10 +141,6 @@  static bool __init has_pv_steal_clock(void)
 {
 	struct arm_smccc_res res;
 
-	/* To detect the presence of PV time support we require SMCCC 1.1+ */
-	if (arm_smccc_1_1_get_conduit() == SMCCC_CONDUIT_NONE)
-		return false;
-
 	arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID,
 			     ARM_SMCCC_HV_PV_TIME_FEATURES, &res);