Skip to content

PCI: trivial demodularization of builtin code

Paul Gortmaker linux-pci linux-tegra lkml 1 version Applied

Status from this message: Applied to pci/demodularize-hosts for v4.8, thanks, Paul!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/14PCI: armada8k: make it explicitly non-modulardrivers/pci/host/pcie-armada8k.c+5 -90 replies
2/14PCI: artpec6: make it explicitly non-modulardrivers/pci/host/pcie-artpec6.c+2 -80 replies
3/14PCI: designware-plat: make it explicitly non-modulardrivers/pci/host/pcie-designware-plat.c+2 -81 reply
4/14PCI: generic: make it explicitly non-modulardrivers/pci/host/pci-host-generic.c+2 -85 replies
5/14PCI: hisi: make it explicitly non-modulardrivers/pci/host/pcie-hisi.c+2 -110 replies
6/14PCI: keystone: make it explicitly non-modulardrivers/pci/host/pci-keystone.c+2 -81 reply
7/14PCI: layerscape: make it explicitly non-modulardrivers/pci/host/pci-layerscape.c+2 -80 replies
8/14PCI: mvebu: make it explicitly non-modulardrivers/pci/host/pci-mvebu.c+4 -70 replies
9/14PCI: rcar: make it explicitly non-modulardrivers/pci/host/pcie-rcar.c+4 -70 replies
10/14PCI: rcar-gen2: make it explicitly non-modulardrivers/pci/host/pci-rcar-gen2.c+3 -90 replies
11/14PCI: tegra: make it explicitly non-modulardrivers/pci/host/pci-tegra.c+4 -70 replies
12/14PCI: thunder-ecam: make it explicitly non-modulardrivers/pci/host/pci-thunder-ecam.c+2 -60 replies
13/14PCI: thunder-pem: make it explicitly non-modulardrivers/pci/host/pci-thunder-pem.c+2 -60 replies
14/14PCI: xgene: make it explicitly non-modulardrivers/pci/host/pci-xgene.c+2 -63 replies

Reviews trailers per patch

5 of 14 patches have a Reviewed-by or Acked-by.

PatchThomas PetazzoniSimon HormanPhil EdworthyJoao PintoWill DeaconMurali Karicheri
1/14
2/14
3/14A-b
4/14A-b
5/14
6/14T-b
7/14
8/14R-b
9/14A-b A-b
10/14A-b A-b
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [PATCH 00/14] PCI: trivial demodularization of builtin code

Firstly, this group of commits was chosen for the fact that they don't change anything even at a binary object file level ; they just replace module_platform_driver with builtin_platform_driver, and remove some MODULE_<blah> tags that are no-ops in code. So the regression risk is zero here.

More specifically, we are doing the following to pci/host 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_platform_driver with builtin_platform_driver, 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.

After considering the inital version of demodularization PCI host commits[1], we did consider striving for tristate[2] on another subset of PCI host files in order to keep bzImage sizes lower on multi-platform builds, but that proved to have technical challenges well outside the scope of what we are trying to achieve here, given PCI is infrastructure code and not a case of simple endpoint drivers.

In the meantime more new code copies the existing examples of bool Kconfig using modular references; further expanding the problem space. So we are just going to proceed with the demodularization as originally planned. Nothing removed here is rocket science, and can easily be restored if someone has the hardware to test on and the desire to expand functionality into the tristate realm.

A more complete description of why we are doing this can be found in the original posting[1] for those that haven't seen it yet.

This represents just over 1/2 the PCI drivers that have their Kconfig as bool but needlessly use modular references. The remainder do not deliver exact binary equivalence, since they delete unused __exit functions and/or unused ".remove" functions. So they are more appropriate for submission earlier in the next development window.

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

Paul.

[1] https://lkml.kernel.org/r/[email protected]
[2] https://lkml.kernel.org/r/[email protected]

---

[vs v1 in [1] above, I tweaked the subjects slightly to match the
format used by most PCI commits, i.e drop the "driver/" prefix. ]

Cc Alexandre Courbot <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc David Daney <[email protected]>
Cc Gabriele Paoloni <[email protected]>
Cc Jason Cooper <[email protected]>
Cc Jesper Nilsson <[email protected]>
Cc Jingoo Han <[email protected]>
Cc Joao Pinto <[email protected]>
Cc Minghuan Lian <[email protected]>
Cc Mingkai Hu <[email protected]>
Cc Murali Karicheri <[email protected]>
Cc Niklas Cassel <[email protected]>
Cc Phil Edworthy <[email protected]>
Cc Pratyush Anand <[email protected]>
Cc Roy Zang <[email protected]>
Cc Simon Horman <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Tanmay Inamdar <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Valentine Barshak <[email protected]>
Cc Will Deacon <[email protected]>
Cc Zhou Wang <[email protected]>

Paul Gortmaker (14):
PCI: armada8k: make it explicitly non-modular
PCI: artpec6: make it explicitly non-modular
PCI: designware-plat: make it explicitly non-modular
PCI: generic: make it explicitly non-modular
PCI: hisi: make it explicitly non-modular
PCI: keystone: make it explicitly non-modular
PCI: layerscape: make it explicitly non-modular
PCI: mvebu: make it explicitly non-modular
PCI: rcar: make it explicitly non-modular
PCI: rcar-gen2: make it explicitly non-modular
PCI: tegra: make it explicitly non-modular
PCI: thunder-ecam: make it explicitly non-modular
PCI: thunder-pem: make it explicitly non-modular
PCI: xgene: make it explicitly non-modular

 drivers/pci/host/pci-host-generic.c     | 10 ++--------
 drivers/pci/host/pci-keystone.c         | 10 ++--------
 drivers/pci/host/pci-layerscape.c       | 10 ++--------
 drivers/pci/host/pci-mvebu.c            | 11 ++++-------
 drivers/pci/host/pci-rcar-gen2.c        | 12 +++---------
 drivers/pci/host/pci-tegra.c            | 11 ++++-------
 drivers/pci/host/pci-thunder-ecam.c     |  8 ++------
 drivers/pci/host/pci-thunder-pem.c      |  8 ++------
 drivers/pci/host/pci-xgene.c            |  8 ++------
 drivers/pci/host/pcie-armada8k.c        | 14 +++++---------
 drivers/pci/host/pcie-artpec6.c         | 10 ++--------
 drivers/pci/host/pcie-designware-plat.c | 10 ++--------
 drivers/pci/host/pcie-hisi.c            | 13 ++-----------
 drivers/pci/host/pcie-rcar.c            | 11 ++++-------
 14 files changed, 38 insertions(+), 108 deletions(-)
Signature · 1 line
2.8.4