From: Bjorn Helgaas <helgaas@kernel.org> To: Vidya Sagar <vidyas@nvidia.com> Cc: lorenzo.pieralisi@arm.com, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.com, jonathanh@nvidia.com, kishon@ti.com, catalin.marinas@arm.com, will.deacon@arm.com, jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, mperttunen@nvidia.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V6 02/15] PCI/PME: Export pcie_pme_disable_msi() & pcie_pme_no_msi() APIs Date: Thu, 16 May 2019 08:28:07 -0500 Message-ID: <20190516132807.GB101793@google.com> (raw) In-Reply-To: <20190513050626.14991-3-vidyas@nvidia.com> On Mon, May 13, 2019 at 10:36:13AM +0530, Vidya Sagar wrote: > Export pcie_pme_disable_msi() & pcie_pme_no_msi() APIs to enable drivers > using these APIs be able to build as loadable modules. > > Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Nak, as-is. 1) The argument for why this is needed is unconvincing. If device advertises MSI support, we should be able to use it. 2) If it turns out we really need this, it should be some sort of per-device setting rather than a global thing like this. > --- > Changes since [v5]: > * Corrected inline implementation of pcie_pme_no_msi() API > > Changes since [v4]: > * None > > Changes since [v3]: > * None > > Changes since [v2]: > * Exported pcie_pme_no_msi() API after making pcie_pme_msi_disabled a static > > Changes since [v1]: > * This is a new patch in v2 series > > drivers/pci/pcie/pme.c | 14 +++++++++++++- > drivers/pci/pcie/portdrv.h | 14 ++------------ > 2 files changed, 15 insertions(+), 13 deletions(-) > > diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c > index 54d593d10396..d5e0ea4a62fc 100644 > --- a/drivers/pci/pcie/pme.c > +++ b/drivers/pci/pcie/pme.c > @@ -25,7 +25,19 @@ > * that using MSI for PCIe PME signaling doesn't play well with PCIe PME-based > * wake-up from system sleep states. > */ > -bool pcie_pme_msi_disabled; > +static bool pcie_pme_msi_disabled; > + > +void pcie_pme_disable_msi(void) > +{ > + pcie_pme_msi_disabled = true; > +} > +EXPORT_SYMBOL_GPL(pcie_pme_disable_msi); > + > +bool pcie_pme_no_msi(void) > +{ > + return pcie_pme_msi_disabled; > +} > +EXPORT_SYMBOL_GPL(pcie_pme_no_msi); > > static int __init pcie_pme_setup(char *str) > { > diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h > index 944827a8c7d3..1d441fe26c51 100644 > --- a/drivers/pci/pcie/portdrv.h > +++ b/drivers/pci/pcie/portdrv.h > @@ -129,18 +129,8 @@ void pcie_port_bus_unregister(void); > struct pci_dev; > > #ifdef CONFIG_PCIE_PME > -extern bool pcie_pme_msi_disabled; > - > -static inline void pcie_pme_disable_msi(void) > -{ > - pcie_pme_msi_disabled = true; > -} > - > -static inline bool pcie_pme_no_msi(void) > -{ > - return pcie_pme_msi_disabled; > -} > - > +void pcie_pme_disable_msi(void); > +bool pcie_pme_no_msi(void); > void pcie_pme_interrupt_enable(struct pci_dev *dev, bool enable); > #else /* !CONFIG_PCIE_PME */ > static inline void pcie_pme_disable_msi(void) {} > -- > 2.17.1 >
next prev parent reply index Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-13 5:06 [PATCH V6 00/15] Add Tegra194 PCIe support Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 01/15] PCI: Add #defines for some of PCIe spec r4.0 features Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 02/15] PCI/PME: Export pcie_pme_disable_msi() & pcie_pme_no_msi() APIs Vidya Sagar 2019-05-13 7:25 ` Christoph Hellwig 2019-05-14 3:30 ` Vidya Sagar 2019-05-14 6:02 ` Christoph Hellwig 2019-05-16 13:34 ` Bjorn Helgaas 2019-05-17 8:19 ` Vidya Sagar 2019-05-17 13:24 ` Bjorn Helgaas 2019-05-17 17:53 ` Vidya Sagar 2019-05-17 18:55 ` Bjorn Helgaas 2019-05-18 1:58 ` Vidya Sagar 2019-05-20 17:57 ` Bjorn Helgaas 2019-05-21 5:06 ` Vidya Sagar 2019-05-16 13:28 ` Bjorn Helgaas [this message] 2019-05-13 5:06 ` [PATCH V6 03/15] PCI: dwc: Perform dbi regs write lock towards the end Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 04/15] PCI: dwc: Move config space capability search API Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 05/15] PCI: dwc: Add ext " Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 06/15] dt-bindings: PCI: designware: Add binding for CDM register check Vidya Sagar 2019-05-13 15:10 ` Rob Herring 2019-05-14 5:27 ` Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 07/15] PCI: dwc: Add support to enable " Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 08/15] dt-bindings: Add PCIe supports-clkreq property Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 09/15] dt-bindings: PCI: tegra: Add device tree support for Tegra194 Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 10/15] dt-bindings: PHY: P2U: Add Tegra194 P2U block Vidya Sagar 2019-05-13 15:22 ` Rob Herring 2019-05-13 5:06 ` [PATCH V6 11/15] arm64: tegra: Add P2U and PCIe controller nodes to Tegra194 DT Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 12/15] arm64: tegra: Enable PCIe slots in P2972-0000 board Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 13/15] phy: tegra: Add PCIe PIPE2UPHY support Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 14/15] PCI: tegra: Add Tegra194 PCIe support Vidya Sagar 2019-05-13 5:06 ` [PATCH V6 15/15] arm64: Add Tegra194 PCIe driver to defconfig Vidya Sagar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190516132807.GB101793@google.com \ --to=helgaas@kernel.org \ --cc=catalin.marinas@arm.com \ --cc=devicetree@vger.kernel.org \ --cc=gustavo.pimentel@synopsys.com \ --cc=jingoohan1@gmail.com \ --cc=jonathanh@nvidia.com \ --cc=kishon@ti.com \ --cc=kthota@nvidia.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=linux-tegra@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=mark.rutland@arm.com \ --cc=mmaddireddy@nvidia.com \ --cc=mperttunen@nvidia.com \ --cc=robh+dt@kernel.org \ --cc=sagar.tv@gmail.com \ --cc=thierry.reding@gmail.com \ --cc=vidyas@nvidia.com \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-PCI Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \ linux-pci@vger.kernel.org public-inbox-index linux-pci Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci AGPL code for this site: git clone https://public-inbox.org/public-inbox.git