Linux Samsung SOC development
 help / color / mirror / Atom feed
* [PATCH 0/8] PCI: more trivial demodularization of builtin code
@ 2016-08-22 21:59 Paul Gortmaker
  2016-08-22 21:59 ` [PATCH 7/8] PCI: exynos: make host support explicitly non-modular Paul Gortmaker
  2016-08-23 20:48 ` [PATCH 0/8] PCI: more trivial demodularization of builtin code Bjorn Helgaas
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Gortmaker @ 2016-08-22 21:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Bjorn Helgaas, Jingoo Han, Krzysztof Kozlowski,
	Kukjin Kim, Ley Foon Tan, Lucas Stach, Pratyush Anand,
	Richard Zhu, Tom Long Nguyen, Will Deacon, rfi, linux-pci,
	linux-samsung-soc

This is another group of commits that was chosen since they really don't
change anything even at a binary object file level ; they just replace
module_init with device_initcall (which are identical), and remove some
MODULE_<blah> tags that are no-ops in code.  So the run time regression
risk is zero here.

More specifically, we are doing the following to these PCI files that
currently can only be built-in:

 -- remove the include of module.h ; replace it with init.h as req'd

 -- drop instances of MODULE_DEVICE_TABLE which is a no-op built-in.

 -- replace module_init (if present) with device_initcall, which is
    functionally identical once CPP has processed the source.

 -- drop instances of MODULE_LICENSE, MODULE_AUTHOR, MODULE_DESCRIPTION
    while ensuring the contained info is present in the file comments.

Build tested for allmodconfig on several arch, including ARM and ARM-64
on a recent linux-next baseline.

Some non-modular PCI files still remain with unused __exit and/or .remove
functions.  Those will be dealt with in a separate series after this.

Also note that we looked into modularizing some of the PCI_DW stuff at
an earlier time[1] but that ran into problems such as trying to create
unwind for hook_fault_code etc. that wasn't easily solved.  So we just
go with keeping the code runtime functionally equivalent to what it was.

Paul.

[1] https://lkml.kernel.org/r/1454889644-27830-1-git-send-email-paul.gortmaker@windriver.com

---

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Pratyush Anand <pratyush.anand@gmail.com>
Cc: Richard Zhu <Richard.Zhu@freescale.com>
Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: rfi@lists.rocketboards.org
Cc: linux-pci@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org

Paul Gortmaker (8):
  PCI: altera: make msi explicitly non-modular
  PCI: altera: make it explicitly non-modular
  PCI: imx6: make it explicitly non-modular
  PCI: portdrv: make it explicitly non-modular
  PCI: spear13xx: make it explicitly non-modular
  PCI: designware: make host support explicitly non-modular
  PCI: exynos: make host support explicitly non-modular
  PCI: generic: make host-common explicitly non-modular

 drivers/pci/host/pci-exynos.c      |  7 +------
 drivers/pci/host/pci-host-common.c |  7 ++-----
 drivers/pci/host/pci-imx6.c        |  9 +--------
 drivers/pci/host/pcie-altera-msi.c | 10 +++++-----
 drivers/pci/host/pcie-altera.c     | 12 +++++-------
 drivers/pci/host/pcie-designware.c |  5 -----
 drivers/pci/host/pcie-spear13xx.c  | 11 ++---------
 drivers/pci/pcie/portdrv_pci.c     |  8 +-------
 8 files changed, 17 insertions(+), 52 deletions(-)

-- 
2.8.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 7/8] PCI: exynos: make host support explicitly non-modular
  2016-08-22 21:59 [PATCH 0/8] PCI: more trivial demodularization of builtin code Paul Gortmaker
@ 2016-08-22 21:59 ` Paul Gortmaker
  2016-08-24 19:15   ` Krzysztof Kozlowski
  2016-08-23 20:48 ` [PATCH 0/8] PCI: more trivial demodularization of builtin code Bjorn Helgaas
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Gortmaker @ 2016-08-22 21:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Gortmaker, Jingoo Han, Bjorn Helgaas, Kukjin Kim,
	Krzysztof Kozlowski, linux-pci, linux-samsung-soc

The Kconfig currently controlling compilation of this code is:

drivers/pci/host/Kconfig:config PCI_EXYNOS
drivers/pci/host/Kconfig:       bool "Samsung Exynos PCIe controller"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

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: Jingoo Han <jingoohan1@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/pci/host/pci-exynos.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
index 219976103efc..c3ae9c7a6e33 100644
--- a/drivers/pci/host/pci-exynos.c
+++ b/drivers/pci/host/pci-exynos.c
@@ -16,7 +16,7 @@
 #include <linux/gpio.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
-#include <linux/module.h>
+#include <linux/init.h>
 #include <linux/of_gpio.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
@@ -624,7 +624,6 @@ static const struct of_device_id exynos_pcie_of_match[] = {
 	{ .compatible = "samsung,exynos5440-pcie", },
 	{},
 };
-MODULE_DEVICE_TABLE(of, exynos_pcie_of_match);
 
 static struct platform_driver exynos_pcie_driver = {
 	.remove		= __exit_p(exynos_pcie_remove),
@@ -641,7 +640,3 @@ static int __init exynos_pcie_init(void)
 	return platform_driver_probe(&exynos_pcie_driver, exynos_pcie_probe);
 }
 subsys_initcall(exynos_pcie_init);
-
-MODULE_AUTHOR("Jingoo Han <jg1.han@samsung.com>");
-MODULE_DESCRIPTION("Samsung PCIe host controller driver");
-MODULE_LICENSE("GPL v2");
-- 
2.8.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/8] PCI: more trivial demodularization of builtin code
  2016-08-22 21:59 [PATCH 0/8] PCI: more trivial demodularization of builtin code Paul Gortmaker
  2016-08-22 21:59 ` [PATCH 7/8] PCI: exynos: make host support explicitly non-modular Paul Gortmaker
@ 2016-08-23 20:48 ` Bjorn Helgaas
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2016-08-23 20:48 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Bjorn Helgaas, Jingoo Han, Krzysztof Kozlowski,
	Kukjin Kim, Ley Foon Tan, Lucas Stach, Pratyush Anand,
	Richard Zhu, Tom Long Nguyen, Will Deacon, rfi, linux-pci,
	linux-samsung-soc

On Mon, Aug 22, 2016 at 05:59:40PM -0400, Paul Gortmaker wrote:
> This is another group of commits that was chosen since they really don't
> change anything even at a binary object file level ; they just replace
> module_init with device_initcall (which are identical), and remove some
> MODULE_<blah> tags that are no-ops in code.  So the run time regression
> risk is zero here.
> 
> More specifically, we are doing the following to these PCI files that
> currently can only be built-in:
> 
>  -- remove the include of module.h ; replace it with init.h as req'd
> 
>  -- drop instances of MODULE_DEVICE_TABLE which is a no-op built-in.
> 
>  -- replace module_init (if present) with device_initcall, which is
>     functionally identical once CPP has processed the source.
> 
>  -- drop instances of MODULE_LICENSE, MODULE_AUTHOR, MODULE_DESCRIPTION
>     while ensuring the contained info is present in the file comments.
> 
> Build tested for allmodconfig on several arch, including ARM and ARM-64
> on a recent linux-next baseline.
> 
> Some non-modular PCI files still remain with unused __exit and/or .remove
> functions.  Those will be dealt with in a separate series after this.
> 
> Also note that we looked into modularizing some of the PCI_DW stuff at
> an earlier time[1] but that ran into problems such as trying to create
> unwind for hook_fault_code etc. that wasn't easily solved.  So we just
> go with keeping the code runtime functionally equivalent to what it was.
> 
> Paul.
> 
> [1] https://lkml.kernel.org/r/1454889644-27830-1-git-send-email-paul.gortmaker@windriver.com
> 
> ---
> 
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Jingoo Han <jingoohan1@gmail.com>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Ley Foon Tan <lftan@altera.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Pratyush Anand <pratyush.anand@gmail.com>
> Cc: Richard Zhu <Richard.Zhu@freescale.com>
> Cc: Tom Long Nguyen <tom.l.nguyen@intel.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: rfi@lists.rocketboards.org
> Cc: linux-pci@vger.kernel.org
> Cc: linux-samsung-soc@vger.kernel.org
> 
> Paul Gortmaker (8):
>   PCI: altera: make msi explicitly non-modular
>   PCI: altera: make it explicitly non-modular
>   PCI: imx6: make it explicitly non-modular
>   PCI: portdrv: make it explicitly non-modular
>   PCI: spear13xx: make it explicitly non-modular
>   PCI: designware: make host support explicitly non-modular
>   PCI: exynos: make host support explicitly non-modular
>   PCI: generic: make host-common explicitly non-modular
> 
>  drivers/pci/host/pci-exynos.c      |  7 +------
>  drivers/pci/host/pci-host-common.c |  7 ++-----
>  drivers/pci/host/pci-imx6.c        |  9 +--------
>  drivers/pci/host/pcie-altera-msi.c | 10 +++++-----
>  drivers/pci/host/pcie-altera.c     | 12 +++++-------
>  drivers/pci/host/pcie-designware.c |  5 -----
>  drivers/pci/host/pcie-spear13xx.c  | 11 ++---------
>  drivers/pci/pcie/portdrv_pci.c     |  8 +-------
>  8 files changed, 17 insertions(+), 52 deletions(-)

I applied all these to pci/demodularize for v4.9, thanks, Paul!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 7/8] PCI: exynos: make host support explicitly non-modular
  2016-08-22 21:59 ` [PATCH 7/8] PCI: exynos: make host support explicitly non-modular Paul Gortmaker
@ 2016-08-24 19:15   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2016-08-24 19:15 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: linux-kernel, Jingoo Han, Bjorn Helgaas, Kukjin Kim,
	Krzysztof Kozlowski, linux-pci, linux-samsung-soc

On Mon, Aug 22, 2016 at 05:59:47PM -0400, Paul Gortmaker wrote:
> The Kconfig currently controlling compilation of this code is:
> 
> drivers/pci/host/Kconfig:config PCI_EXYNOS
> drivers/pci/host/Kconfig:       bool "Samsung Exynos PCIe controller"
> 
> ...meaning that it currently is not being built as a module by anyone.
> 
> Lets remove the couple traces of modular infrastructure use, so that
> when reading the driver there is no doubt it is builtin-only.
> 
> 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: Jingoo Han <jingoohan1@gmail.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-samsung-soc@vger.kernel.org
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>  drivers/pci/host/pci-exynos.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-24 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-22 21:59 [PATCH 0/8] PCI: more trivial demodularization of builtin code Paul Gortmaker
2016-08-22 21:59 ` [PATCH 7/8] PCI: exynos: make host support explicitly non-modular Paul Gortmaker
2016-08-24 19:15   ` Krzysztof Kozlowski
2016-08-23 20:48 ` [PATCH 0/8] PCI: more trivial demodularization of builtin 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