Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp397376lqp; Wed, 12 Jun 2024 05:13:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkatuu7HXf27zDL0y6y10XTVmFExUoTvvG2s+Q595P2DqlQM6zzTHMbrDJnNLTYpYr5KDbcGwCy6eJkHtUoNSWwneNs+9m3V24YmUjIw== X-Google-Smtp-Source: AGHT+IGmrVbR/V4TPgdN0NqB1yxSxC0T5hpFvdH0ky0S3/L2HEsEjZll29GQeTSaJBRMNNS174ka X-Received: by 2002:a50:cdde:0:b0:57c:aac9:cd8 with SMTP id 4fb4d7f45d1cf-57caac90d78mr964783a12.8.1718194427304; Wed, 12 Jun 2024 05:13:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718194427; cv=pass; d=google.com; s=arc-20160816; b=XighVBCoPUJ5zrnKMEmPHiA5qrAqg30dIDk0d5N3xV+bzTbJb2aS3CIMAJDldtp0T4 Tkv2rnNjidja9Ojuw2Bij1Togojq7P/lfS0fAEt3yW2+xcHByLamvtUARGhDuvECuYQ6 tPI5zhiWfylN+dbpXyuhGHotHpHgjsF6+P7vukSdELt+YfVQqamswJnfcs5U4aeCQo9v jbeV1dD7FHDMMfoAlGb2RwxLp207xqI11X7gH8W+TR73Gk1DvsC3So0TVpYthtLhAN0c YKlzc7j8JGmBQ/3f7ighfAoFAAUVd9DA/MP4E4u7NtHSZhjpi3HM8rFVvApnxLM4x43V ubqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=kCzkCVOO/S6I7xxBKf3rQmzVC4qFCdmvbVAR9bBl8wg=; fh=cueYpAIJvlQJzPPq4sIx7uuyKPlBam45aL1LTdFclAY=; b=yHrLcVMvoI+HU9a3aupqlpBXsQecokPKHcA7PgBIYgzaeVqYzuPaRvYkt5VkBhnnsP Hvcc2sdCrXB9K3Bxtuivx0q/UZKFNAo2pTFZ5xq+qCzpoo929j24q9qa0f1GB7wK3/aw Eui9YLv6qa9c53qRPr8tBMR7lQ1ROyH5OeR+DppRuaZiHvyuj8FfJD6QKRBak8rAhtUF mvM5dyHRKWn3ME9XJp7ByjGCt2+/qxxjFUM1U6aABSWuivwAjvI/txSdshqpR7WTdSGY RDaxV+Z50r0tAGDjBzrhM3q4uJhuOnTbGTwaSOL0LNPV+De9IdKx/nUZ2K672ecASlaG 9lHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211472-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c613b68dasi5158007a12.42.2024.06.12.05.13.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 05:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211472-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; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-211472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211472-linux.lists.archive=gmail.com@vger.kernel.org" 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 CB8011F21DC3 for ; Wed, 12 Jun 2024 12:12:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B2A316F821; Wed, 12 Jun 2024 12:12:50 +0000 (UTC) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 649FE38F83; Wed, 12 Jun 2024 12:12:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718194370; cv=none; b=Z1+Tp5M2gbN7NaRV56cMyIs/tEYNXSu1p0xVWSp2utp0KNarkpahIS6Hk32zMdzBR3RCktaKrvevy/YHo7I8mgtGSpNxh+JNQhrSMAbvE6r/3uTBpqlQzCyD65pfRA6Ipn6ZcO3uooyyiiyh4DKWrZrU3EqwpYPfd2TyyV1HbLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718194370; c=relaxed/simple; bh=VvWykEFj0IqDX/aWlkXc+2OJkJ4bnwO8Nif0QnQ/jdE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hsCw4lIE+DLcR8oke++gZMQiJvLD3dZRsP9wxq8QlYpBQLwXkgh6vY8k1HVhbX4QIkFXiQei7iLgi9q5OP2lsjkHBZPrzh0id5eZjFG1Gi1pKmF+i/PucpAj5iFqYVUHryUcenEJTTZwpzxL9Vhy7G6qm8jEvTvj9usZcFmaJsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a6f1dc06298so276667766b.1; Wed, 12 Jun 2024 05:12:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718194367; x=1718799167; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kCzkCVOO/S6I7xxBKf3rQmzVC4qFCdmvbVAR9bBl8wg=; b=LWhl2q7yCgz8FboLl+91EdsGpSRo858erh4R62l86sjyB9dB6aBgGTL74PtM8ARZoy MUIrbGIXQvWA7KUEjPt1/cubMMSpTnbuxWoYUQGPNM3+1DaosSj/rHlGS3nciSceKy7G lL3uNNigNcxmO2CDW2ilZL4wsZWKyUnNXU2UMm8UU0oy9uKGbWTo//qn2/DDbfxQlk9G pR7e3Br64XtOnfWxsZt4rTsV/bJhbAnYzHy4O4QVD4H9aSuulk+v0vmrO7+2x2Q6PTfF 2wMHbvhzz6nhF5hw2vB/udtG8gv3rWHxLr7CiWd6iQPUO55x9L4a27OkLvzWCBGSFX8n kDwA== X-Forwarded-Encrypted: i=1; AJvYcCVcuXNBk84aOkE45axKIzdsf+9zF04h37hg4DnZSYFkc4O3FV/IyG86OBEEFrzRkcrrBNPWF9/dTm3b+TvRHQdeVdFTSqQQoiNNr0WOQvk2F6maIu2fxqKZ9yLPLElY6Pt3htoeQ2KGkxdSc0lJXFHUJJVFCmENU49I2V8kJ3HAMjGNKfU= X-Gm-Message-State: AOJu0Yxh0C8quRpjul4XbHf/kaepS0KNNyPLGxctXV1WfQpLmD8WSVE/ ESNxkWfzVAQf1bLOulpji+VV1AZo8VlNdFjw1qFAn/nJf5UKlFDI X-Received: by 2002:a17:906:b1c4:b0:a6f:e01:742f with SMTP id a640c23a62f3a-a6f47c9f048mr94138666b.31.1718194366273; Wed, 12 Jun 2024 05:12:46 -0700 (PDT) Received: from gmail.com (fwdproxy-lla-000.fbsv.net. [2a03:2880:30ff::face:b00c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f42166597sm125092766b.115.2024.06.12.05.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 05:12:45 -0700 (PDT) Date: Wed, 12 Jun 2024 05:12:43 -0700 From: Breno Leitao To: Andy Shevchenko , ldewangan@nvidia.com Cc: Laxman Dewangan , Dmitry Osipenko , Andi Shyti , Thierry Reding , Jonathan Hunter , paulmck@kernel.org, apopple@nvidia.com, Michael van der Westhuizen , "open list:I2C SUBSYSTEM HOST DRIVERS" , "open list:TEGRA ARCHITECTURE SUPPORT" , open list Subject: Re: [PATCH] [i2c-tegra] Do not mark ACPI devices as irq safe Message-ID: References: <20240606132708.1610308-1-leitao@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hello Andy, On Tue, Jun 11, 2024 at 03:49:02PM +0300, Andy Shevchenko wrote: > On Thu, Jun 06, 2024 at 06:27:07AM -0700, Breno Leitao wrote: > > The problem arises because during __pm_runtime_resume(), the spinlock > > &dev->power.lock is acquired before rpm_resume() is called. Later, > > rpm_resume() invokes acpi_subsys_runtime_resume(), which relies on > > mutexes, triggering the error. > > > > To address this issue, devices on ACPI are now marked as not IRQ-safe, > > considering the dependency of acpi_subsys_runtime_resume() on mutexes. > > ... > > While it's a move in the right direction, the real fix is to get rid of > the IRQ safe PM hack completely. > Look at how OMAP code was modified for > the last few years and now it's pm_runtime_irq_safe()-free. The main > (ab)users are SH code followed by Tegra drivers. Thanks. I think these are two different goals here. This near term goal is just fix the driver so it can use the pm_runtime_irq_safe() in a saner way, avoiding calling mutexes inside spinlocks. Getting rid of the IRQ safe PM seems to me to be more a long term desirable goal, and unfortunately I cannot afford doing it now. Laxman, what is your view on this topic? --breno