]> www.infradead.org Git - users/jedix/linux-maple.git/commit
coresight-funnel: change funnel_drvdata spinlock's type to raw_spinlock_t
authorYeoreum Yun <yeoreum.yun@arm.com>
Thu, 6 Mar 2025 12:11:07 +0000 (12:11 +0000)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Mon, 10 Mar 2025 10:40:26 +0000 (10:40 +0000)
commit56eb02f0b04fce3b5c4e3224b659e342cc7a8c56
tree5c9451f6ce3b04df20f5b3709c33eb290cae96b1
parent6b80c0abe475ed1017c5e862636049aa1cc17a1a
coresight-funnel: change funnel_drvdata spinlock's type to raw_spinlock_t

In coresight-funnel drivers, cti_drvdata->spinlock can be held
during __schedule() by perf_event_task_sched_out()/in().

Since funnel_drvdata->spinlock type is spinlock_t and
perf_event_task_sched_out()/in() is called after acquiring rq_lock,
which is raw_spinlock_t (an unsleepable lock),
this poses an issue in PREEMPT_RT kernel where spinlock_t is sleepable.

To address this, change type funnel_drvdata->spinlock in
coresight-funnel drivers, which can be called by
perf_event_task_sched_out()/in(), from spinlock_t to raw_spinlock_t.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20250306121110.1647948-7-yeoreum.yun@arm.com
drivers/hwtracing/coresight/coresight-funnel.c