Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1340225rdb; Mon, 19 Feb 2024 11:59:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUEU6tpeKuJGrmsdfXpAo5vCFwjgKivtx4L21y3G80amnCyAe8tf38biP+vsUX3jYKX+mD0iXhhnsKqnfqLjN6vFdNxo1qmeGq+Jwt2gw== X-Google-Smtp-Source: AGHT+IEBvg/rP0C5aiT8CDpupNCfgCK5L0RrPq9PG/yQFD4TQtC0USZTg+BVBwvBPmhIp41xTOkE X-Received: by 2002:a17:906:e246:b0:a3e:69eb:45dc with SMTP id gq6-20020a170906e24600b00a3e69eb45dcmr3231301ejb.21.1708372791019; Mon, 19 Feb 2024 11:59:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708372791; cv=pass; d=google.com; s=arc-20160816; b=CCRlqqVvh/pA1eDoYy7iBnbe7Mx6kISIldnKck2RpQrI7wzRuhmgUAiKJAMVAIK4UJ z8NXgunMACcEKjYfE16HFGjJ1WjqQ5DaMwp+d8XsXIYG4Nq5V5wX/8mTRZgElBB+wEk5 Qj6ZQFHM1byGBVLxoKIvv9KqQkddUkmlCy1S4VG27nJz9VBMzMJQShtRhU1WrVN0XGd4 6T89Pr/Y5OyHSJwmqpyWqys6A5TuKuzcZLZdTIAyW02CWkMpJw6VjiiOn5B1z2fpu9W8 kVWeUGqHEI7HV3cYjJr5gXgr+SZzsA7t9PXb9SPMiwhstCvg9Qebry5G02YSryWGV1yl zF1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=s4DzhaKf0vAIXchiqvP1x0OqPxipS/FnE8nIaEoxUKA=; fh=LOynIoGsIcCMdPC1QzzjJynRZ/faW1WIR3/UfREgjqw=; b=DT0l/ujGwwPmKwAQJ2P7+iIRd4uQCcv5G8OfjmQE9nPoLjpm8Gg48uUzJ6eZtjGTzz QJgS97blwyDeds9sBFC2taIYT9dhCwwjq8rP1NgpaonZ9Grtn4CZCOtF4MOsiQB7Bqjx SY8vXv0paVu3IBP5RRbzvDqMFF4xqwl7OFAn/U5YuDeuZUxG3K0L3AWvI6GomQeH9jHB 0FzARpGYFDEr4tKpFb/V93ReXB7oAXKNbvap0PIaCAyhXueKzB0UbRzmlU2Y2xgVHpX0 1pLetL/T3tpMp+Ot8eX/tepXsx3FUyKTK84UJbo+5mxFZJyUVkvJdAUEz7O25a2x2UZ8 NO+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h36kLlcW; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71932-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71932-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id mc17-20020a170906eb5100b00a3e8323c0c4si1384990ejb.846.2024.02.19.11.59.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 11:59:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71932-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=h36kLlcW; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71932-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71932-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BB9AA1F2302B for ; Mon, 19 Feb 2024 19:59:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A890453398; Mon, 19 Feb 2024 19:58:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h36kLlcW" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 34F2451033 for ; Mon, 19 Feb 2024 19:58:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708372699; cv=none; b=eNxv+LJR1iUxqapVgr5+vO3EdQM/FSUw3sG4RJ3CRbq9RBkg2PdXPHDgL66Gn5uemNWnS0mYF5uv00oawQXUZGPSsb1kCi6Tk9/QMEhNtfx4fRzrG/RO3qUXjMWVOobV2f/YbouJWCKfnzdSlfCmrGILUX0ruJ5cMvIQ4PRWcBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708372699; c=relaxed/simple; bh=TquE1dW+qm+nVtngnRKRNtP2lZTiAhrMZ6Ch/QG2DI4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rQtbnXSOQybKUj6K2A57OAiFQ6fF4xFUAiBUeWrpjRHVzvwiWCi+3DhOjp3wix2ZnB3xiXqdkxjVpqHKnp53QjARKfYBzmqj0UdnO4jKQiSB94vmmSca5ukag3YCdsXg9PgTs6c6xP80sU4OlMkrm5nK9w0PFGEGSIcP6b+W4Xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=h36kLlcW; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708372698; x=1739908698; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TquE1dW+qm+nVtngnRKRNtP2lZTiAhrMZ6Ch/QG2DI4=; b=h36kLlcWT41Km2bnHbnqIMtkxibn6hWt5bUK+lgwpv6gr0woKlY5XHqu 4q1fE/qYTAy8tBnmtNDFX07/cbHtvLNEi/BjL3fc3JwpGs3R91LlUsSFm kJZtaSFUlEzzmJw/cd6Y9MhyfVp0dx0n1PuBl15hKa+Y0KSVHOOMZ8KkH 0CLPmiXvFe7x7exa57/TTWRdclapNwT9SXdr/TUXkfdPv+7zDAR1XE95N zOABs5e4HnWJvezLgTzXoBXxuXTF+4hY8NlL4F9CEeTdII6S6sONYG71X BJvMLIxDxymIk7QXFdUXa6BXCel4mEtW2jCzj9l91z6JqpEEeNDa9cCFP Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10989"; a="19893439" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="19893439" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 11:58:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="9239476" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 11:58:14 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 1BC0611F855; Mon, 19 Feb 2024 21:58:08 +0200 (EET) From: Sakari Ailus To: linux-kernel@vger.kernel.org Cc: Hans de Goede , Tomas Winkler , Wentong Wu , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH v2 1/3] mei: vsc: Call wake_up() in the threaded IRQ handler Date: Mon, 19 Feb 2024 21:58:05 +0200 Message-Id: <20240219195807.517742-2-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240219195807.517742-1-sakari.ailus@linux.intel.com> References: <20240219195807.517742-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The hard IRQ handler vsc_tp_irq() is called with a raw spinlock taken. wake_up() acquires a spinlock, a sleeping lock on PREEMPT_RT. This leads to sleeping in atomic context. Move the wake_up() call to the threaded IRQ handler vsc_tp_thread_isr() where it can be safely called. Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Signed-off-by: Sakari Ailus --- drivers/misc/mei/vsc-tp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c index 6f4a4be6ccb5..2b69ada9349e 100644 --- a/drivers/misc/mei/vsc-tp.c +++ b/drivers/misc/mei/vsc-tp.c @@ -416,8 +416,6 @@ static irqreturn_t vsc_tp_isr(int irq, void *data) atomic_inc(&tp->assert_cnt); - wake_up(&tp->xfer_wait); - return IRQ_WAKE_THREAD; } @@ -425,6 +423,8 @@ static irqreturn_t vsc_tp_thread_isr(int irq, void *data) { struct vsc_tp *tp = data; + wake_up(&tp->xfer_wait); + if (tp->event_notify) tp->event_notify(tp->event_notify_context); -- 2.39.2