From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Grant Likely <grant.likely@linaro.org>,
Heiko Stuebner <heiko@sntech.de>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
kernel@collabora.com,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Subject: [PATCH v2 0/3] Rework panthor's cache flush and soft reset locking
Date: Thu, 30 Jul 2026 13:45:13 +0200 [thread overview]
Message-ID: <20260730-panthor-cache-flush-fix-v2-0-28790478bfff@collabora.com> (raw)
There are two problems in panthor's cache flushing/soft reset code
related to locking.
The first problem is that the spinlocks are taken with _irqsave, even
though the contended lock is never acquired in a raw interrupt handler.
Only a threaded handler locks it.
The second problem is that the wait_event condition references
pending_reqs without holding the required lock. This means there's a
data race.
While resolving the first problem is easy, the second problem requires
adding some more macro variants to wait.h, which is done in the first
patch.
New tracepoints to debug cache flushing duration without initial locking
waits is thrown in for good measure as well, to complement what's in
lock_stat and what the function tracer can already do.
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Changes in v2:
- Use trace event template for the two tracepoints (ty Steven Rostedt)
- Link to v1: https://patch.msgid.link/20260729-panthor-cache-flush-fix-v1-0-205921ed3c81@collabora.com
---
Nicolas Frattaroli (3):
wait: Introduce non-irq variants of wait_event_lock_timeout
drm/panthor: Revisit reqs_lock handling in flush/reset paths
drm/panthor: Add tracepoints for cache flushing
drivers/gpu/drm/panthor/panthor_gpu.c | 28 +++++------
drivers/gpu/drm/panthor/panthor_trace.h | 49 +++++++++++++++++++
include/linux/wait.h | 84 +++++++++++++++++++++++++++++++++
3 files changed, 147 insertions(+), 14 deletions(-)
---
base-commit: 5e24f68d311764bf343f9def49b752b509dfd5fd
change-id: 20260728-panthor-cache-flush-fix-b36cb15f92c3
Best regards,
--
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
next reply other threads:[~2026-07-30 11:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 11:45 Nicolas Frattaroli [this message]
2026-07-30 11:45 ` [PATCH v2 1/3] wait: Introduce non-irq variants of wait_event_lock_timeout Nicolas Frattaroli
2026-07-30 15:08 ` Liviu Dudau
2026-07-31 8:00 ` Steven Price
2026-07-30 11:45 ` [PATCH v2 2/3] drm/panthor: Revisit reqs_lock handling in flush/reset paths Nicolas Frattaroli
2026-07-30 14:56 ` Liviu Dudau
2026-07-31 8:01 ` Steven Price
2026-08-03 8:53 ` Boris Brezillon
2026-08-03 13:13 ` Nicolas Frattaroli
2026-08-03 13:20 ` Nicolas Frattaroli
2026-08-03 15:59 ` Boris Brezillon
2026-07-30 11:45 ` [PATCH v2 3/3] drm/panthor: Add tracepoints for cache flushing Nicolas Frattaroli
2026-07-30 13:46 ` Steven Rostedt
2026-07-30 15:14 ` Liviu Dudau
2026-07-31 8:03 ` Steven Price
2026-08-03 9:03 ` Boris Brezillon
2026-08-04 14:44 ` Nicolas Frattaroli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260730-panthor-cache-flush-fix-v2-0-28790478bfff@collabora.com \
--to=nicolas.frattaroli@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=grant.likely@linaro.org \
--cc=heiko@sntech.de \
--cc=juri.lelli@redhat.com \
--cc=kernel@collabora.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mripard@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®