From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CEB1FCF11FF for ; Thu, 10 Oct 2024 15:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=w/ZmpxU5Ar2FNW/jteZs/sVfkGodgjpZwiHNQvHm7l0=; b=enAhUlq0xNEBcKa4QGCd2JFWZV zbx+nCugOMKH0a9bcr2dIzHLyUIqI1hTnF2dM9a0etU/z1ozDzrOblUN9P7+3D+odp+0EwiQe36vp 4mn4/TpaaLOdvGU4Gl9fPzoQlWw0yWuFqJKrG0Apcm9mz9Yt4S5seFLUPQLSPmGa/54UC+pAdWKNI eN6t6O4lsF8wq7b1/nuu8KtDyRQzGZWtF8BkHJBl8k1LO/maeHeGVZqyFMByI3yT9I3yJ7PczCxEd KK2Vt8S+0Ws8weIHujMPP/+/ZwgpoTapfjCp13t6KjHAeGo29++Hzhf2jNC5nKJwsn3SganHLFKwn BCNYPF2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syvWW-0000000DQuj-0wdY; Thu, 10 Oct 2024 15:56:20 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syvAI-0000000DLwi-295d for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2024 15:33:25 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-20b061b7299so172835ad.1 for ; Thu, 10 Oct 2024 08:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1728574400; x=1729179200; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=w/ZmpxU5Ar2FNW/jteZs/sVfkGodgjpZwiHNQvHm7l0=; b=DSPM4Ek3+khoN7CZP+6tzPSgTRj3mYSGiymJig0ikeyCdWN+EQ9IAmi++kR6tq/Z0S W9AF9zDpQAAfPookZ6MfCREyDyAxsQ7Syl3dFObN4THFidyrM+UQZ0HtpmN4JKAEmhtc 8NW7S/fazYM37Ny7QrPvEHEAytDXxEo7/5W86zRR3oXi4CybefL+++wLS70UF8CyY47i I6QnHR4DWG6yMKYkKgJMTmbGuAhKhw4H0f2NnHnhfAkix2x5gUkzqmQScVTNycZ6pkkz 1whqHZQcyHfANulw2o7hGZ8WPa8xaWROuFxccV+79ZV5oxdPNFl1I38EZkdWldgtVkn/ N0wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728574400; x=1729179200; 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=w/ZmpxU5Ar2FNW/jteZs/sVfkGodgjpZwiHNQvHm7l0=; b=GrWhYehVJhTI+K/psAWB85W451vEjQ/d7SP6A+2bdxn4dgq/bauZvr2QjVTm38cdrd uRNVWtfyiTw3EOPhLxlejmoax9EQ4uoF56i/Jo02WWTE1hPnlXpFPBYowN6qphU3syQL n0wbyUbHJAxpvUd43MJ+guPwk7DphplBISPEijUY3x8RciMj5RgvJbSaUafymEOQnd7i RNUkIAadO8iuR/3TY2YdLVjv+aDF1Ul0/nfk2Jxv4woHNa3bhFvYi5uEsaqI4PPbb9u2 92nI6IbRr7U1ZurSWLSfIJGg3oxO2nMLaC/HHxnjqSGEPm861/nrFiNQ3FuKc+bvzFOs BzXQ== X-Forwarded-Encrypted: i=1; AJvYcCVRGuNFU1/2xD/72PBEsqq/bNPfJeZ7/bafhju6TI+bA6B+2SqMug4pzYo50Mgvzp0xAQD5c2I+g53TMD0oitdP@lists.infradead.org X-Gm-Message-State: AOJu0YyqftAwN9dOEwQfj7vX9++1+11NsdWa9gR0cp1vvRSDf7HFapRQ LcYRaVYEnWr1f5O12kPLnrmjUarCOViotGska7dFQfIm396ZcGwgIm1hiGkz7w== X-Google-Smtp-Source: AGHT+IGckJvBw34/8XK0AfFY3nhmk4JYCNb2V2wP3vhB3S6j5MJz7Bqeauq+12aWJVrNrkRGxHknOQ== X-Received: by 2002:a17:902:eccd:b0:20b:7784:278a with SMTP id d9443c01a7336-20c82eb95f0mr3152015ad.22.1728574399488; Thu, 10 Oct 2024 08:33:19 -0700 (PDT) Received: from google.com (62.166.143.34.bc.googleusercontent.com. [34.143.166.62]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e2d5fc5c53sm1452540a91.51.2024.10.10.08.33.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 08:33:19 -0700 (PDT) Date: Thu, 10 Oct 2024 15:33:11 +0000 From: Pranjal Shrivastava To: Sakari Ailus Cc: Will Deacon , Robin Murphy , Joerg Roedel , Jason Gunthorpe , Rob Clark , Georgi Djakov , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev Subject: Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend() Message-ID: References: <20241004094101.113349-1-sakari.ailus@linux.intel.com> <20241004094123.113725-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241004094123.113725-1-sakari.ailus@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_083323_624807_815907D0 X-CRM114-Status: GOOD ( 22.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 04, 2024 at 12:41:23PM +0300, Sakari Ailus wrote: > pm_runtime_put_autosuspend() will soon be changed to include a call to > pm_runtime_mark_last_busy(). This patch switches the current users to > __pm_runtime_put_autosuspend() which will continue to have the > functionality of old pm_runtime_put_autosuspend(). > > Signed-off-by: Sakari Ailus > --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c > index 8321962b3714..cad02d5dc6d2 100644 > --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c > @@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu) > static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu) > { > if (pm_runtime_enabled(smmu->dev)) > - pm_runtime_put_autosuspend(smmu->dev); > + __pm_runtime_put_autosuspend(smmu->dev); > } Seems like a straightforward change as a result of [1]. Although, I had a few things to discuss: 1. The `rpm_resume` in drivers/base/power/runtime.c seems to call `pm_runtime_mark_last_busy` in case the ->runtime_resume callback returned successfully. In such a case, why would we want to move `pm_runtime_mark_last_busy` within `pm_runtime_put_autosuspend` ? 2. In the arm-smmu driver, we seem to rely on the rpm_resume to call `pm_runtime_mark_last_busy` as a part of the ->runtime_resume callback. The only other case, where we might wanna `*mark_last_busy` is if we want the autosuspend timer to be re-started in case of a failed suspend. However, the `arm_smmu_runtime_suspend` doesn't return errno in any case hence, I don't see any other case where we'd benefit from using `mark_last_busy` in the arm-smmu driver. On the other hand, I don't see a problem with using it either :) Any thoughts Will/Rob/Robin? > > static void arm_smmu_rpm_use_autosuspend(struct arm_smmu_device *smmu) > -- > 2.39.5 > Apart from the above discussion, for this patch alone: Reviewed-by: Pranjal Shrivastava Thanks, Pranjal [1] https://lore.kernel.org/all/20240109133639.111210-1-sakari.ailus@linux.intel.com/