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 1D3D6C4167B for ; Mon, 4 Dec 2023 11:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OHWUjGCsRQQWSusTtsDRrWo5Mic6vxeW+dWB1mpNkLc=; b=LPCfG3BKKgH51v jgJQOQ41q5X77JSp8xkUD5tpbgZlDOxrmM68Ey+Tlw+b8l+vLJ/OoywvTXZmhXNKYbdEaOtVtTeqq nNhiepd3mQILZ+738/6u8Fb5h9Y9KCidzk4/sxYIE8n4/zRFJtK7VN6vHm0J26a7C03HD9s3O3XrD v9o7CKTgyZw9E4YQ9CEjuIiIKcURUYBq/3FJ3xy+pwvRQVZ7bW1mIi4b8tc+odyv24YPU2KDwUedd KO6oofp63R12cCGYnrZ2Cyk3Xt1qgRR9j11e/k4vCgVW/yxaq0/sIzudUkisILsNyJAzK3DgJSxO/ YJMXhV17NIQuydSS2IGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rA7Jz-003fKk-27; Mon, 04 Dec 2023 11:41:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rA7Jl-003fHg-2V for linux-arm-kernel@lists.infradead.org; Mon, 04 Dec 2023 11:41:05 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2FE49152B; Mon, 4 Dec 2023 03:41:35 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3DCBA3F6C4; Mon, 4 Dec 2023 03:40:46 -0800 (PST) Date: Mon, 4 Dec 2023 11:40:43 +0000 From: Sudeep Holla To: James Clark Cc: Anshuman Khandual , linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com, Sudeep Holla , Lorenzo Pieralisi , Mike Leach , Maxime Coquelin , Alexandre Torgue , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH V2 5/7] coresight: tmc: Move ACPI support from AMBA driver to platform driver Message-ID: References: <20231201062053.1268492-1-anshuman.khandual@arm.com> <20231201062053.1268492-6-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231204_034053_940944_F0054B25 X-CRM114-Status: GOOD ( 18.46 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 04, 2023 at 10:54:15AM +0000, James Clark wrote: > > > On 01/12/2023 06:20, Anshuman Khandual wrote: > > Add support for the tmc devices in the platform driver, which can then be > > used on ACPI based platforms. This change would now allow runtime power > > management for ACPI based systems. The driver would try to enable the APB > > clock if available. > > > [...] > > -module_amba_driver(tmc_driver); > > +static int tmc_platform_probe(struct platform_device *pdev) > > +{ > > + struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > > + struct tmc_drvdata *drvdata; > > + int ret = 0; > > + > > + drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL); > > + if (!drvdata) > > + return -ENOMEM; > > + > > + drvdata->pclk = coresight_get_enable_apb_pclk(&pdev->dev); > > + if (IS_ERR(drvdata->pclk)) > > + return -ENODEV; > > + > > + dev_set_drvdata(&pdev->dev, drvdata); > > + pm_runtime_get_noresume(&pdev->dev); > > + pm_runtime_set_active(&pdev->dev); > > + pm_runtime_enable(&pdev->dev); > > + > > + ret = __tmc_probe(&pdev->dev, res, NULL); > > + if (ret) { > > + pm_runtime_put_noidle(&pdev->dev); > > + pm_runtime_disable(&pdev->dev); > > + } > > I'm not sure if these pm_runtime()s are right because there is already a > put inside of __tmc_probe() if it fails. If you unload and then reload > all the coresight modules with these patches you get these errors which > are new: > Ah good find. I have just tested with ACPI and these modules as built-in to be more specific. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel