* [PATCH 0/9] PCI: final demodularization of non-modular code
@ 2016-08-24 20:57 Paul Gortmaker
2016-08-24 20:57 ` [PATCH 4/9] PCI: dra7xx: make host code explicitly non-modular Paul Gortmaker
2016-08-24 22:34 ` [PATCH 0/9] PCI: final demodularization of non-modular code Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Paul Gortmaker @ 2016-08-24 20:57 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Bharat Kumar Gogada, Bjorn Helgaas, Keith Busch,
Kishon Vijay Abraham I, kristen.c.accardi, Marc Zyngier,
Michal Simek, Mika Westerberg, Scott Murray, Sören Brinkmann,
Stanimir Varbanov, Tom Long Nguyen, linux-omap, linux-pci
This final (assuming more new instances don't leak back in) series
ensures all the PCI code out there that remains using module.h is
actually modular or containing some use of modular infrastructure.
These last commits are slightly more involved than some of the
earlier ones since we are actually removing orphaned __exit functions
and some ".remove" functions as well. So we can't claim binary
equivalence here, but the overall runtime should remain unchanged.
To that end, we have remained with the existing initcall levels
even though some of the hotplug infrastructural ones might make
better sense to be listed as subsys_initcall or similar.
Build tested with allmodconfig on all the major architectures.
Paul.
---
Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: kristen.c.accardi@intel.com
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Scott Murray <scott@spiteful.org>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Paul Gortmaker (9):
PCI: PCIe dpc: make it explicitly non-modular
PCI: PCIe pme: make it explicitly non-modular
PCI: PCIe aerdrv: make it explicitly non-modular
PCI: dra7xx: make host code explicitly non-modular
PCI: PCIe qcom: make host code explicitly non-modular
PCI: PCIe xilinx: make host code explicitly non-modular
PCI: PCIe xilinx-nwl: make host code explicitly non-modular
PCI: hotplug_core: make it explicitly non-modular
PCI: hotplug: make PCIe core code explicitly non-modular
drivers/pci/host/pci-dra7xx.c | 31 ++-----------------
drivers/pci/host/pcie-qcom.c | 28 +++++------------
drivers/pci/host/pcie-xilinx-nwl.c | 53 ++-------------------------------
drivers/pci/host/pcie-xilinx.c | 53 ++-------------------------------
drivers/pci/hotplug/cpci_hotplug.h | 2 --
drivers/pci/hotplug/cpci_hotplug_core.c | 10 -------
drivers/pci/hotplug/pci_hotplug_core.c | 18 ++++-------
drivers/pci/hotplug/pciehp_core.c | 20 ++++---------
drivers/pci/pcie/aer/aerdrv.c | 18 +----------
drivers/pci/pcie/pcie-dpc.c | 18 +++--------
drivers/pci/pcie/pme.c | 16 +---------
11 files changed, 32 insertions(+), 235 deletions(-)
--
2.8.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 4/9] PCI: dra7xx: make host code explicitly non-modular
2016-08-24 20:57 [PATCH 0/9] PCI: final demodularization of non-modular code Paul Gortmaker
@ 2016-08-24 20:57 ` Paul Gortmaker
2016-08-24 22:34 ` [PATCH 0/9] PCI: final demodularization of non-modular code Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 2016-08-24 20:57 UTC (permalink / raw)
To: linux-kernel
Cc: Paul Gortmaker, Kishon Vijay Abraham I, Bjorn Helgaas, linux-omap,
linux-pci
The Kconfig currently controlling compilation of this code is:
drivers/pci/host/Kconfig:config PCI_DRA7XX
drivers/pci/host/Kconfig: bool "TI DRA7xx PCIe controller"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
drivers/pci/host/pci-dra7xx.c | 31 +++----------------------------
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 81b3949a26db..19223ed2e619 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -15,7 +15,7 @@
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
#include <linux/of_gpio.h>
#include <linux/pci.h>
#include <linux/phy/phy.h>
@@ -443,25 +443,6 @@ err_phy:
return ret;
}
-static int __exit dra7xx_pcie_remove(struct platform_device *pdev)
-{
- struct dra7xx_pcie *dra7xx = platform_get_drvdata(pdev);
- struct pcie_port *pp = &dra7xx->pp;
- struct device *dev = &pdev->dev;
- int count = dra7xx->phy_count;
-
- if (pp->irq_domain)
- irq_domain_remove(pp->irq_domain);
- pm_runtime_put(dev);
- pm_runtime_disable(dev);
- while (count--) {
- phy_power_off(dra7xx->phy[count]);
- phy_exit(dra7xx->phy[count]);
- }
-
- return 0;
-}
-
#ifdef CONFIG_PM_SLEEP
static int dra7xx_pcie_suspend(struct device *dev)
{
@@ -545,19 +526,13 @@ static const struct of_device_id of_dra7xx_pcie_match[] = {
{ .compatible = "ti,dra7-pcie", },
{},
};
-MODULE_DEVICE_TABLE(of, of_dra7xx_pcie_match);
static struct platform_driver dra7xx_pcie_driver = {
- .remove = __exit_p(dra7xx_pcie_remove),
.driver = {
.name = "dra7-pcie",
.of_match_table = of_dra7xx_pcie_match,
+ .suppress_bind_attrs = true,
.pm = &dra7xx_pcie_pm_ops,
},
};
-
-module_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe);
-
-MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>");
-MODULE_DESCRIPTION("TI PCIe controller driver");
-MODULE_LICENSE("GPL v2");
+builtin_platform_driver_probe(dra7xx_pcie_driver, dra7xx_pcie_probe);
--
2.8.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/9] PCI: final demodularization of non-modular code
2016-08-24 20:57 [PATCH 0/9] PCI: final demodularization of non-modular code Paul Gortmaker
2016-08-24 20:57 ` [PATCH 4/9] PCI: dra7xx: make host code explicitly non-modular Paul Gortmaker
@ 2016-08-24 22:34 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2016-08-24 22:34 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-kernel, Bharat Kumar Gogada, Bjorn Helgaas, Keith Busch,
Kishon Vijay Abraham I, kristen.c.accardi, Marc Zyngier,
Michal Simek, Mika Westerberg, Scott Murray, Sören Brinkmann,
Stanimir Varbanov, Tom Long Nguyen, linux-omap, linux-pci
On Wed, Aug 24, 2016 at 04:57:43PM -0400, Paul Gortmaker wrote:
> This final (assuming more new instances don't leak back in) series
> ensures all the PCI code out there that remains using module.h is
> actually modular or containing some use of modular infrastructure.
>
> These last commits are slightly more involved than some of the
> earlier ones since we are actually removing orphaned __exit functions
> and some ".remove" functions as well. So we can't claim binary
> equivalence here, but the overall runtime should remain unchanged.
>
> To that end, we have remained with the existing initcall levels
> even though some of the hotplug infrastructural ones might make
> better sense to be listed as subsys_initcall or similar.
>
> Build tested with allmodconfig on all the major architectures.
>
> Paul.
> ---
>
> Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Keith Busch <keith.busch@intel.com>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: kristen.c.accardi@intel.com
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Scott Murray <scott@spiteful.org>
> Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
> Cc: Stanimir Varbanov <svarbanov@mm-sol.com>
> Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
> Cc: linux-omap@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
>
> Paul Gortmaker (9):
> PCI: PCIe dpc: make it explicitly non-modular
> PCI: PCIe pme: make it explicitly non-modular
> PCI: PCIe aerdrv: make it explicitly non-modular
> PCI: dra7xx: make host code explicitly non-modular
> PCI: PCIe qcom: make host code explicitly non-modular
> PCI: PCIe xilinx: make host code explicitly non-modular
> PCI: PCIe xilinx-nwl: make host code explicitly non-modular
> PCI: hotplug_core: make it explicitly non-modular
> PCI: hotplug: make PCIe core code explicitly non-modular
>
> drivers/pci/host/pci-dra7xx.c | 31 ++-----------------
> drivers/pci/host/pcie-qcom.c | 28 +++++------------
> drivers/pci/host/pcie-xilinx-nwl.c | 53 ++-------------------------------
> drivers/pci/host/pcie-xilinx.c | 53 ++-------------------------------
> drivers/pci/hotplug/cpci_hotplug.h | 2 --
> drivers/pci/hotplug/cpci_hotplug_core.c | 10 -------
> drivers/pci/hotplug/pci_hotplug_core.c | 18 ++++-------
> drivers/pci/hotplug/pciehp_core.c | 20 ++++---------
> drivers/pci/pcie/aer/aerdrv.c | 18 +----------
> drivers/pci/pcie/pcie-dpc.c | 18 +++--------
> drivers/pci/pcie/pme.c | 16 +---------
> 11 files changed, 32 insertions(+), 235 deletions(-)
Applied to pci/demodularize for v4.9, thanks a lot, Paul!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-24 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 20:57 [PATCH 0/9] PCI: final demodularization of non-modular code Paul Gortmaker
2016-08-24 20:57 ` [PATCH 4/9] PCI: dra7xx: make host code explicitly non-modular Paul Gortmaker
2016-08-24 22:34 ` [PATCH 0/9] PCI: final demodularization of non-modular code Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).