From patchwork Thu Jun 13 10:20:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 13696572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE593C2BA1A for ; Thu, 13 Jun 2024 10:28:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E786A10EA18; Thu, 13 Jun 2024 10:28:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=linutronix.de header.i=@linutronix.de header.b="JiQJxhfV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ZsDPtgBJ"; dkim-atps=neutral Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D2D510EA12; Thu, 13 Jun 2024 10:28:28 +0000 (UTC) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718274506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JGSmjArusF1lmM7xxq4EzrB6RjHqaWLj4654SVALGo8=; b=JiQJxhfVgqwtPy8PUDpDYskljaBY0mxWJT9eHL9OGd2ZHKbnFBQVco2DTAfuQ+O9hVXTUW DejcCAuuq26R/setVzu87W/eLMfbbPkmXSK+WOmkC3qHAwItdGUbdj8TwwFgz5b+f4Gigm zozx0Za+rsjw29bTJCJPktWXxC47zymnfksqxOzRYVLyt3WBJHToUNFrJVCYGxc9gCXeb3 m3SCacut4VVI59f+cng07HI1JolNPqVwmAw4fAbjuHFLG0dT4c4SGesXgTSDwnq1KJDY1G NJKmk8HoHF5WMFlQ6RAnZB5MMQxnUb3HCWyLyF7Bu+3I/yuSaPwfwsqU7OkDTQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718274506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JGSmjArusF1lmM7xxq4EzrB6RjHqaWLj4654SVALGo8=; b=ZsDPtgBJXgji89kxKPtSLNy/wRtIjUe/bdH1GGqRqACVcme4jKUTOq6s8+q7R3NVMfAYgA MD/s3zNShy9vU2DQ== To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Thomas Gleixner , Tvrtko Ursulin , Sebastian Andrzej Siewior , Maarten Lankhorst Subject: [PATCH v2 6/8] drm/i915: Drop the irqs_disabled() check Date: Thu, 13 Jun 2024 12:20:23 +0200 Message-ID: <20240613102818.4056866-7-bigeasy@linutronix.de> In-Reply-To: <20240613102818.4056866-1-bigeasy@linutronix.de> References: <20240613102818.4056866-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The !irqs_disabled() check triggers on PREEMPT_RT even with i915_sched_engine::lock acquired. The reason is the lock is transformed into a sleeping lock on PREEMPT_RT and does not disable interrupts. There is no need to check for disabled interrupts. The lockdep annotation below already check if the lock has been acquired by the caller and will yell if the interrupts are not disabled. Remove the !irqs_disabled() check. Reported-by: Maarten Lankhorst Signed-off-by: Sebastian Andrzej Siewior Acked-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_request.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 519e096c607cd..466b5ee8ed6d2 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -608,7 +608,6 @@ bool __i915_request_submit(struct i915_request *request) RQ_TRACE(request, "\n"); - GEM_BUG_ON(!irqs_disabled()); lockdep_assert_held(&engine->sched_engine->lock); /* @@ -717,7 +716,6 @@ void __i915_request_unsubmit(struct i915_request *request) */ RQ_TRACE(request, "\n"); - GEM_BUG_ON(!irqs_disabled()); lockdep_assert_held(&engine->sched_engine->lock); /*