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 89AF2C07E9D for ; Tue, 27 Sep 2022 08:34:45 +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=sHTYpz7lRQetSnjHuhpYat2nf/Prn+F3GLrjiyN24Ko=; b=jv8S42V1P0Miv7 Qo1EcpzTjZNhcKQi3t8CFGKoH3uQ425Kd3zbP6EqxSZZiB+YZ2kqpoMFiRf+Ohb7ML09TnJnEwDUY oa/xlk+n2mckKKmh7y0h/zz23mO7Q3Ra760wD/xMMJa6w79HtwIK/0+1hZ0YhELUv0YAXvXlOYI3M 5kdkpo4tWj35gB4lmmKm6G6I+QL2Rn5R+9NiJisS/p9goDUXOZyC2HCDEW4QZ1enpg+yQjEbpd1nS lmsin+drS7QBNrKJ9O7RdPvq/jGte+/Ov7mZDesroJqFKYQC+U1uFuVu5y08uYeU4nmHMlNWV3Cj4 zuju/G3Jo4QInw3P7vcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1od61k-009BRM-7s; Tue, 27 Sep 2022 08:33:17 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1od5yx-009ACL-L0 for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 08:30:25 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D0E26B81A38; Tue, 27 Sep 2022 08:30:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 890BEC433B5; Tue, 27 Sep 2022 08:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664267420; bh=YEtCda1YzQZuLUK2vmniBFY3GXf94Fw8eA7ydi3ocBc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CXQnZi1SEicEPbDb4a7WXj4v7/NH/bOsrFblFsxf4M9hzSD49t6sLNXrYlzhHJNVQ vtYbTAqEPJtuFxGwVUapU3fNG1uWjTlomSYVypD9hFhfBy+uN5Q5XXFV1+OUW3L1HP p+Drqhix1Bmu+ZPOZh6d+7IQPQ1h69wk8wTY6AM1IZpRC1PcMU1rZyDenjS0XdzgUX QtBs1jplk+CLv9sGkz184cPst7fh2BAZ9v5qIKSaQnlm4G67DbKHg70p9Ct7pEVlsU W7Y5B5rDcBBnhB/4NAA/t6bk1mP36Z+kiFidKcsu6cSDKiufKJGxOk0WT/EIQnf3M5 uWKyB4mfEM1AQ== Date: Tue, 27 Sep 2022 10:30:15 +0200 From: Lorenzo Pieralisi To: Marek =?iso-8859-1?Q?Beh=FAn?= Cc: Lorenzo Pieralisi , Bjorn Helgaas , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , pali@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Miquel Raynal Subject: Re: [PATCH 07/11] PCI: aardvark: Add suspend to RAM support Message-ID: References: <20220818135140.5996-1-kabel@kernel.org> <20220818135140.5996-8-kabel@kernel.org> 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-20220927_013024_035070_1FB10A28 X-CRM114-Status: GOOD ( 29.23 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 09, 2022 at 12:33:01PM +0200, Lorenzo Pieralisi wrote: > On Thu, Aug 18, 2022 at 03:51:36PM +0200, Marek Beh=FAn wrote: > > From: Miquel Raynal > > = > > Add suspend and resume callbacks. We need to use the NOIRQ variants to > > ensure the controller's IRQ handlers are not run during suspend() / > > resume(), which could cause races. > = > Be more explicit please, which races, which IRQ handlers. This is useful > information for future testers/reviewers in case something has to be > changed, thanks. Can we update the log please ? Thanks, Lorenzo > Lorenzo > = > > Signed-off-by: Miquel Raynal > > Signed-off-by: Pali Roh=E1r > > Signed-off-by: Marek Beh=FAn > > --- > > Changes since batch 5: > > - clarified commit message > > - changed to new macro NOIRQ_SYSTEM_SLEEP_PM_OPS, as was done for many > > PCI controller drivers with commit 19b7858c3357 ("PCI: Convert to new > > *_PM_OPS macros") > > --- > > drivers/pci/controller/pci-aardvark.c | 34 +++++++++++++++++++++++++++ > > 1 file changed, 34 insertions(+) > > = > > diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/contro= ller/pci-aardvark.c > > index 3beafc893969..e30a33a4ecc6 100644 > > --- a/drivers/pci/controller/pci-aardvark.c > > +++ b/drivers/pci/controller/pci-aardvark.c > > @@ -1890,6 +1890,39 @@ static int advk_pcie_setup_phy(struct advk_pcie = *pcie) > > return ret; > > } > > = > > +static int advk_pcie_suspend(struct device *dev) > > +{ > > + struct advk_pcie *pcie =3D dev_get_drvdata(dev); > > + > > + advk_pcie_disable_phy(pcie); > > + > > + clk_disable_unprepare(pcie->clk); > > + > > + return 0; > > +} > > + > > +static int advk_pcie_resume(struct device *dev) > > +{ > > + struct advk_pcie *pcie =3D dev_get_drvdata(dev); > > + int ret; > > + > > + ret =3D clk_prepare_enable(pcie->clk); > > + if (ret) > > + return ret; > > + > > + ret =3D advk_pcie_enable_phy(pcie); > > + if (ret) > > + return ret; > > + > > + advk_pcie_setup_hw(pcie); > > + > > + return 0; > > +} > > + > > +static const struct dev_pm_ops advk_pcie_dev_pm_ops =3D { > > + NOIRQ_SYSTEM_SLEEP_PM_OPS(advk_pcie_suspend, advk_pcie_resume) > > +}; > > + > > static int advk_pcie_probe(struct platform_device *pdev) > > { > > struct device *dev =3D &pdev->dev; > > @@ -2167,6 +2200,7 @@ static struct platform_driver advk_pcie_driver = =3D { > > .driver =3D { > > .name =3D "advk-pcie", > > .of_match_table =3D advk_pcie_of_match_table, > > + .pm =3D &advk_pcie_dev_pm_ops, > > }, > > .probe =3D advk_pcie_probe, > > .remove =3D advk_pcie_remove, > > -- = > > 2.35.1 > > = > > = > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > = > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel