diff mbox series

[7/8] drm/i915/pmu: Remove pointless synchronize_rcu() call

Message ID 20241011225430.1219345-8-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series Fix i915 pmu on bind/unbind | expand

Commit Message

Lucas De Marchi Oct. 11, 2024, 10:54 p.m. UTC
This is already done inside perf_pmu_unregister() - no need to do it
before.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/i915_pmu.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Matt Roper Oct. 30, 2024, 12:14 a.m. UTC | #1
On Fri, Oct 11, 2024 at 03:54:29PM -0700, Lucas De Marchi wrote:
> This is already done inside perf_pmu_unregister() - no need to do it
> before.
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_pmu.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
> index e28c29bae2d9a..2f8004ade6d36 100644
> --- a/drivers/gpu/drm/i915/i915_pmu.c
> +++ b/drivers/gpu/drm/i915/i915_pmu.c
> @@ -1338,13 +1338,8 @@ void i915_pmu_unregister(struct drm_i915_private *i915)
>  	if (!pmu->registered)
>  		return;
>  
> -	/*
> -	 * "Disconnect" the PMU callbacks - since all are atomic synchronize_rcu
> -	 * ensures all currently executing ones will have exited before we
> -	 * proceed with unregistration.
> -	 */
> +	/* Disconnect the PMU callbacks */
>  	pmu->registered = false;
> -	synchronize_rcu();
>  
>  	hrtimer_cancel(&pmu->timer);
>  
> -- 
> 2.47.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c
index e28c29bae2d9a..2f8004ade6d36 100644
--- a/drivers/gpu/drm/i915/i915_pmu.c
+++ b/drivers/gpu/drm/i915/i915_pmu.c
@@ -1338,13 +1338,8 @@  void i915_pmu_unregister(struct drm_i915_private *i915)
 	if (!pmu->registered)
 		return;
 
-	/*
-	 * "Disconnect" the PMU callbacks - since all are atomic synchronize_rcu
-	 * ensures all currently executing ones will have exited before we
-	 * proceed with unregistration.
-	 */
+	/* Disconnect the PMU callbacks */
 	pmu->registered = false;
-	synchronize_rcu();
 
 	hrtimer_cancel(&pmu->timer);