From: Joe Korty <joe.korty@concurrent-rt.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
Clark Williams <williams@redhat.com>,
Jun Miao <jun.miao@windriver.com>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 5.10-rt+] drm/i915/gt: transform irq_disable into local_lock.
Date: Thu, 7 Oct 2021 12:59:28 -0400 [thread overview]
Message-ID: <20211007165928.GA43890@zipoli.concurrent-rt.com> (raw)
Convert IRQ blocking in intel_breadcrumbs_park() to a local lock.
Affects 5.10-rt and all later releases, up to and including when
rt was merged into mainline.
This problem has been reported in two other linux-rt-users postings,
[PREEMPT_RT] i915: fix PREEMPT_RT locking splats (Clark Williams)
[linux-5.12.y-rt] drm/i915/gt: Fix a lockdep warning with interrupts enabled (Jun Miao)
Neither of these submit the obvious solution, nor,
AFAICT, has either yet been acted on. So I muddy the
waters further by submitting this, a third fix.
Signed-off-by: Joe Korty <joe.korty@concurrent-rt.com>
Tested-by: Joe Korty <joe.korty@concurrent-rt.com>
Index: b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
===================================================================
--- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
@@ -34,6 +34,16 @@
#include "intel_gt_pm.h"
#include "intel_gt_requests.h"
+#include <linux/local_lock.h>
+
+struct event_lock {
+ local_lock_t l;
+};
+
+static DEFINE_PER_CPU(struct event_lock, event_lock) = {
+ .l = INIT_LOCAL_LOCK(l),
+};
+
static bool irq_enable(struct intel_engine_cs *engine)
{
if (!engine->irq_enable)
@@ -342,9 +352,9 @@ void intel_breadcrumbs_park(struct intel
/* Kick the work once more to drain the signalers */
irq_work_sync(&b->irq_work);
while (unlikely(READ_ONCE(b->irq_armed))) {
- local_irq_disable();
+ local_lock_irq(&event_lock.l);
signal_irq_work(&b->irq_work);
- local_irq_enable();
+ local_unlock_irq(&event_lock.l);
cond_resched();
}
GEM_BUG_ON(!list_empty(&b->signalers));
next reply other threads:[~2021-10-07 16:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 16:59 Joe Korty [this message]
2021-10-07 17:19 ` [PATCH 5.10-rt+] drm/i915/gt: transform irq_disable into local_lock Sebastian Andrzej Siewior
2021-10-09 16:49 ` Joe Korty
2021-11-16 20:25 ` Steven Rostedt
2021-11-16 21:02 ` Sebastian Andrzej Siewior
2021-11-16 21:39 ` Steven Rostedt
2021-11-22 19:50 ` Joe Korty
2021-11-22 20:32 ` Steven Rostedt
2021-11-30 15:10 ` Sebastian Andrzej Siewior
2021-11-30 22:03 ` Joe Korty
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=20211007165928.GA43890@zipoli.concurrent-rt.com \
--to=joe.korty@concurrent-rt.com \
--cc=bigeasy@linutronix.de \
--cc=jun.miao@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=williams@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.