[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241127120954.0facd34f@gandalf.local.home>
Date: Wed, 27 Nov 2024 12:09:54 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: suzuki.poulose@....com, mike.leach@...aro.org, james.clark@...aro.org,
alexander.shishkin@...ux.intel.com, bigeasy@...utronix.de,
clrkwllms@...nel.org, coresight@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-rt-devel@...ts.linux.dev, nd@....com
Subject: Re: [PATCH 1/9] coresight: change coresight_device lock type to
raw_spinlock_t
On Mon, 25 Nov 2024 09:48:08 +0000
Yeoreum Yun <yeoreum.yun@....com> wrote:
> @@ -853,17 +851,14 @@ EXPORT_SYMBOL_GPL(cscfg_unregister_csdev);
> void cscfg_csdev_reset_feats(struct coresight_device *csdev)
> {
> struct cscfg_feature_csdev *feat_csdev;
> - unsigned long flags;
>
> - spin_lock_irqsave(&csdev->cscfg_csdev_lock, flags);
> + guard(raw_spinlock_irqsave)(&csdev->cscfg_csdev_lock);
> +
> if (list_empty(&csdev->feature_csdev_list))
> - goto unlock_exit;
> + return;
>
> list_for_each_entry(feat_csdev, &csdev->feature_csdev_list, node)
> cscfg_reset_feat(feat_csdev);
We should start documenting what is not real-time "safe". That is, if this
code is executed, we have a loop here that holds a raw spin lock. This
appears to make the time the raw spin lock held to be non deterministic.
If someone is running PREEMPT_RT and expects deterministic behavior, they
cannot be using this code. That is fine, but we should probably create a
document somewhere that notes this.
-- Steve
> -
> -unlock_exit:
> - spin_unlock_irqrestore(&csdev->cscfg_csdev_lock, flags);
> }
> EXPORT_SYMBOL_GPL(cscfg_csdev_reset_feats);
>
Powered by blists - more mailing lists