mirror of
https://github.com/OpenVoiceOS/OpenVoiceOS
synced 2025-02-21 22:27:49 +01:00
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From 570c90a1aed48c9a6e0b5ff37a2ceb5576d70333 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
Date: Tue, 3 Oct 2023 21:37:21 +0200
|
|
Subject: [PATCH 167/196] drm/i915/guc: Consider also RCU depth in busy loop.
|
|
|
|
intel_guc_send_busy_loop() looks at in_atomic() and irqs_disabled() to
|
|
decide if it should busy-spin while waiting or if it may sleep.
|
|
Both checks will report false on PREEMPT_RT if sleeping spinlocks are
|
|
acquired leading to RCU splats while the function sleeps.
|
|
|
|
Check also if RCU has been disabled.
|
|
|
|
Reported-by: "John B. Wyatt IV" <jwyatt@redhat.com>
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
---
|
|
drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
|
|
index 8dc291ff0093..5b8d084c9c58 100644
|
|
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
|
|
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
|
|
@@ -317,7 +317,7 @@ static inline int intel_guc_send_busy_loop(struct intel_guc *guc,
|
|
{
|
|
int err;
|
|
unsigned int sleep_period_ms = 1;
|
|
- bool not_atomic = !in_atomic() && !irqs_disabled();
|
|
+ bool not_atomic = !in_atomic() && !irqs_disabled() && !rcu_preempt_depth();
|
|
|
|
/*
|
|
* FIXME: Have caller pass in if we are in an atomic context to avoid
|
|
--
|
|
2.45.1
|
|
|