linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock
@ 2022-11-04  6:16 Usama Arif
  2022-11-04  9:13 ` Steven Price
  2022-11-09 19:14 ` Will Deacon
  0 siblings, 2 replies; 3+ messages in thread
From: Usama Arif @ 2022-11-04  6:16 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, kvmarm, kvm, virtualization,
	linux, yezengruan, catalin.marinas, will, maz, steven.price,
	mark.rutland
  Cc: fam.zheng, liangma, punit.agrawal, Usama Arif

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(-)

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);
 
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock
  2022-11-04  6:16 [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock Usama Arif
@ 2022-11-04  9:13 ` Steven Price
  2022-11-09 19:14 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Price @ 2022-11-04  9:13 UTC (permalink / raw)
  To: Usama Arif, linux-kernel, linux-arm-kernel, kvmarm, kvm,
	virtualization, linux, yezengruan, catalin.marinas, will, maz,
	mark.rutland
  Cc: fam.zheng, liangma, punit.agrawal

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);
>  


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock
  2022-11-04  6:16 [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock Usama Arif
  2022-11-04  9:13 ` Steven Price
@ 2022-11-09 19:14 ` Will Deacon
  1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2022-11-09 19:14 UTC (permalink / raw)
  To: mark.rutland, linux-kernel, Usama Arif, steven.price, kvm, kvmarm,
	linux-arm-kernel, maz, linux, yezengruan, catalin.marinas,
	virtualization
  Cc: kernel-team, Will Deacon, punit.agrawal, liangma, fam.zheng

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,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-11-09 19:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04  6:16 [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock Usama Arif
2022-11-04  9:13 ` Steven Price
2022-11-09 19:14 ` Will Deacon

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