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 174E6C52D7C for ; Tue, 13 Aug 2024 07:26:11 +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=JRqfFafHF5XewBUoy5tZuHbvr8oDZuevEuG5wBULNKA=; b=l9HbI/J9/0FerM1kgu+/hEKq0/ e/3hYFPbC6q0XoAHwiIhPPSggkipXzpghCJmBD5gdvBWMXRIc2RZfH+VuIL+swgQlmYOqeHjKaI7B 5/654oF8k6iY211p++Y52bTnyIZ12ttj2MtusctKbSGx7J3v43NRK73jGtLDxkxz5GE2mYEALeTfs 7KWmf/ATPKhMkgmFymI2v8GMt5TTszK06R62/sWkC0ht8ATS8+ZYfOWrZca/7d/e72R0CrbfzHo5s 9Xcin/i/AATtIUyUw9J9K8cgXmnRQqx1kzJBTRidgH5Pfx6XVF7d8sX1kuRiaNGUgew1RvqbGC17I vL1mpsoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdluo-00000002iRS-3ggc; Tue, 13 Aug 2024 07:25:58 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdlpR-00000002giK-34D7 for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2024 07:20:27 +0000 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fed726aefcso43745ad.1 for ; Tue, 13 Aug 2024 00:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1723533625; x=1724138425; 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=JRqfFafHF5XewBUoy5tZuHbvr8oDZuevEuG5wBULNKA=; b=A6Z6VGI2FgjimdTZ00/SLNoNpsO1z+Za7hrAQDwSJaia8SFuAG/nq7MqC87uEdaAHW gvM0tQUq+ayWhF3NFoCWQf8FwNyMT5MZ/wIM7H0kX+HLLFp38mifJJAHPuSmoM4Suu1H 7OePGdm9p4Ztv68TmvO8Ods6viSd7pEjBnIRg4i4ulS0NBtLC0Su23QRbtsi2nh3vHiY UJzUhDEj8jvecO3NUS/AI2oQrSB+PpTMemPB94ALY5EQQp8uRm4MkKcqrQXJtFXfrNn1 yvXf+0oyDaU/8ea92RoqEovyOb32czFLPVMJuN4Bp4e6S5aPdf7FNJoP3aUc52ooIy3M qpZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723533625; x=1724138425; 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=JRqfFafHF5XewBUoy5tZuHbvr8oDZuevEuG5wBULNKA=; b=cylliMbooUwxI8rKYDlvGZDk0hX6zICF7n92fcoqxM4cLE+uRieAlpJ0iriLz69Roy SHiN98j7BVIwXbUzaE/llEHKgYi7IQlrUM2K/l5WymywB2XWTv+Or1lvoRQSb/zcvPCg jFlZ2gK0J9B6D4wfl3r1ZQJTq/OxsnxmzQCEcvvHy6g6Z91yMfqaaZ9q4gBmYv7EAidb dN2KOGRqhwkh7C2bek3fMpFjVcyjrBAORFxLqwrf6Cw7ueBrepxxuG/F94cD2ee2mk2C Zo9THfjaUeCqBTmSwoyIyyOuPWiDgkIYM+n4JpIvXQnkTylNgrPODO4s3+Kwjh17EEDx p+ZQ== X-Forwarded-Encrypted: i=1; AJvYcCWF6rx3IA02j7Sgn3RiOaXfSFe8Ov8cWPtb9JNhPXfb52IaiCEG13gA4pPac1srijAz1YNrk8MLxZF/uqPuu1/Z4WuGz7j6NqxM0PFKWS+bhsrUk3Q= X-Gm-Message-State: AOJu0Yw3f1fvEddXUl3rOl1RTMjHfatgJbgMK/NhktMNnbTFb6Y3k4Wc R0xkaUJ7KhOI0HtWRPhkUirUQTiCk2hI60t3wsFUEufSS/MHRaRyzR0orfieVg== X-Google-Smtp-Source: AGHT+IH3c19ieOFuxpG9Od28VUkUNWd5p7w4JT1Tcj/IJODP0Cw03Yuz3owloBqLlS4SpQoR2wasig== X-Received: by 2002:a17:903:646:b0:1f9:d111:8a1e with SMTP id d9443c01a7336-201ccbc957emr1049735ad.26.1723533624423; Tue, 13 Aug 2024 00:20:24 -0700 (PDT) Received: from google.com (202.141.197.35.bc.googleusercontent.com. [35.197.141.202]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd12f5d5sm7442055ad.19.2024.08.13.00.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 00:20:23 -0700 (PDT) Date: Tue, 13 Aug 2024 07:20:14 +0000 From: Pranjal Shrivastava To: Zhenhua Huang Cc: robdclark@gmail.com, will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, iommu@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, quic_c_gdjako@quicinc.com, dmitry.baryshkov@linaro.org Subject: Re: [PATCH 1/1] iommu/arm-smmu-qcom: remove runtime pm enabling for TBU driver Message-ID: References: <1722335443-30080-1-git-send-email-quic_zhenhuah@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240813_002025_828174_CD16A517 X-CRM114-Status: GOOD ( 31.66 ) 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 Tue, Aug 13, 2024 at 10:37:33AM +0800, Zhenhua Huang wrote: > > > On 2024/8/12 21:25, Pranjal Shrivastava wrote: > > On Tue, Jul 30, 2024 at 06:30:43PM +0800, Zhenhua Huang wrote: > > > TBU driver has no runtime pm support now, adding pm_runtime_enable() > > > seems to be useless. Remove it. > > > > > > Signed-off-by: Zhenhua Huang > > > --- > > > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 6 ------ > > > 1 file changed, 6 deletions(-) > > > > > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > > > index 36c6b36ad4ff..aff2fe1fda13 100644 > > > --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > > > +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > > > @@ -566,7 +566,6 @@ static struct acpi_platform_list qcom_acpi_platlist[] = { > > > static int qcom_smmu_tbu_probe(struct platform_device *pdev) > > > { > > > - struct device *dev = &pdev->dev; > > > int ret; > > > if (IS_ENABLED(CONFIG_ARM_SMMU_QCOM_DEBUG)) { > > > @@ -575,11 +574,6 @@ static int qcom_smmu_tbu_probe(struct platform_device *pdev) > > > return ret; > > > } > > > - if (dev->pm_domain) { > > > - pm_runtime_set_active(dev); > > > - pm_runtime_enable(dev); > > > > I assumed that this was required to avoid the TBU from being powered > > down? If so, then I think we shall move it under the > > Hi Pranjal, > > In my sense, this was giving the TBU ability to power down when > necessary(through pm callbacks)? While I haven't seen any RPM impl for TBU > device.. hence having the doubt.. > > Thanks, > Zhenhua Apologies for being unclear. I just meant to ask if there was a reason to add pm_runtime_set_active & enable in the tbu probe previously? And I *assumed* that it was to set the device state as RPM_ACTIVE to avoid it being RPM_SUSPENDED after enabling pm_runtime. I agree that there are no pm_runtime_suspend/resume calls within the TBU driver. I'm just trying to understand why was pm_runtime enabled here earlier (since it's not implemented) in order to ensure that removing it doesn't cause further troubles? I see Georgi added it as a part of https://lore.kernel.org/all/20240704010759.507798-1-quic_c_gdjako@quicinc.com/ But I'm unsure why was it required to fix that bug? > > > previous if condition, i.e. CONFIG_ARM_SMMU_QCOM_DEBUG? > > > > If not, we can remove it give that the TBU would be powered ON as needed > > > > > - } > > > - > > > return 0; > > > } > > > -- > > > 2.7.4 > > > > > > > > > > Thanks, > > Pranjal Thanks, Pranjal