2020-04-15 14:40:12

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 0/4] PCI: Don't select Kconfig symbols by default

From: Bjorn Helgaas <[email protected]>

A few Kconfig symbols snuck in with "default y". In general we don't want
that because we don't want to bloat the kernel with unnecessary drivers.

Remove the ones that are optional.

There are a few left, but they depend on something else that seems like the
real choice, e.g., XEN_PCIDEV_FRONTEND depends on XEN and PCI_XGENE_MSI
depends on PCI_XGENE.

Bjorn Helgaas (4):
PCI: dra7xx: Don't select CONFIG_PCI_DRA7XX_HOST by default
PCI: keystone: Don't select CONFIG_PCI_KEYSTONE_HOST by default
PCI/AER: Don't select CONFIG_PCIEAER by default
PCI/ASPM: Don't select CONFIG_PCIEASPM by default

drivers/pci/controller/dwc/Kconfig | 2 --
drivers/pci/pcie/Kconfig | 2 --
2 files changed, 4 deletions(-)

--
2.26.0.110.g2183baf09c-goog


2020-04-15 14:40:20

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 1/4] PCI: dra7xx: Don't select CONFIG_PCI_DRA7XX_HOST by default

From: Bjorn Helgaas <[email protected]>

Drivers should not be selected by default because that bloats the kernel
for people who don't need them.

Remove the "default y" for CONFIG_PCI_DRA7XX_HOST.

Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Kishon Vijay Abraham I <[email protected]>
Cc: [email protected]
---
drivers/pci/controller/dwc/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
index 03dcaf65d159..ea335ee7ca8e 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -26,7 +26,6 @@ config PCI_DRA7XX_HOST
depends on OF && HAS_IOMEM && TI_PIPE3
select PCIE_DW_HOST
select PCI_DRA7XX
- default y
help
Enables support for the PCIe controller in the DRA7xx SoC to work in
host mode. There are two instances of PCIe controller in DRA7xx.
--
2.26.0.110.g2183baf09c-goog

2020-04-15 14:40:27

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 2/4] PCI: keystone: Don't select CONFIG_PCI_KEYSTONE_HOST by default

From: Bjorn Helgaas <[email protected]>

Drivers should not be selected by default because that bloats the kernel
for people who don't need them.

Remove the "default y" for CONFIG_PCI_KEYSTONE_HOST.

Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Murali Karicheri <[email protected]>
Cc: [email protected]
---
drivers/pci/controller/dwc/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
index ea335ee7ca8e..695f754b2110 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -110,7 +110,6 @@ config PCI_KEYSTONE_HOST
depends on PCI_MSI_IRQ_DOMAIN
select PCIE_DW_HOST
select PCI_KEYSTONE
- default y
help
Enables support for the PCIe controller in the Keystone SoC to
work in host mode. The PCI controller on Keystone is based on
--
2.26.0.110.g2183baf09c-goog

2020-04-15 14:40:43

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 3/4] PCI/AER: Don't select CONFIG_PCIEAER by default

From: Bjorn Helgaas <[email protected]>

PCIe Advanced Error Reporting (AER) is optional and there's no need for it
to be selected by default.

Remove the "default y" for CONFIG_PCIEAER.

Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Russell Currey <[email protected]>
Cc: Sam Bobroff <[email protected]>
Cc: Oliver O'Halloran <[email protected]>
Cc: Kuppuswamy Sathyanarayanan <[email protected]>
---
drivers/pci/pcie/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index 66386811cfde..9cd31331aee9 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -25,7 +25,6 @@ config PCIEAER
bool "PCI Express Advanced Error Reporting support"
depends on PCIEPORTBUS
select RAS
- default y
help
This enables PCI Express Root Port Advanced Error Reporting
(AER) driver support. Error reporting messages sent to Root
--
2.26.0.110.g2183baf09c-goog

2020-04-15 14:42:43

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 4/4] PCI/ASPM: Don't select CONFIG_PCIEASPM by default

From: Bjorn Helgaas <[email protected]>

PCIe Active State Power Management (ASPM) is optional and there's no need
for it to be selected by default.

Remove the "default y" for CONFIG_PCIEASPM.

Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Heiner Kallweit <[email protected]>
---
drivers/pci/pcie/Kconfig | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index 9cd31331aee9..5b7b460a8a98 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -62,7 +62,6 @@ config PCIE_ECRC
#
config PCIEASPM
bool "PCI Express ASPM control" if EXPERT
- default y
help
This enables OS control over PCI Express ASPM (Active State
Power Management) and Clock Power Management. ASPM supports
--
2.26.0.110.g2183baf09c-goog

Subject: Re: [PATCH 3/4] PCI/AER: Don't select CONFIG_PCIEAER by default

Hi,

On 4/14/20 5:12 PM, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> PCIe Advanced Error Reporting (AER) is optional and there's no need for it
> to be selected by default.
>
> Remove the "default y" for CONFIG_PCIEAER.
Makes sense.
Reviewed-by: Kuppuswamy Sathyanarayanan
<[email protected]>
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> Cc: Russell Currey <[email protected]>
> Cc: Sam Bobroff <[email protected]>
> Cc: Oliver O'Halloran <[email protected]>
> Cc: Kuppuswamy Sathyanarayanan <[email protected]>
> ---
> drivers/pci/pcie/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
> index 66386811cfde..9cd31331aee9 100644
> --- a/drivers/pci/pcie/Kconfig
> +++ b/drivers/pci/pcie/Kconfig
> @@ -25,7 +25,6 @@ config PCIEAER
> bool "PCI Express Advanced Error Reporting support"
> depends on PCIEPORTBUS
> select RAS
> - default y
> help
> This enables PCI Express Root Port Advanced Error Reporting
> (AER) driver support. Error reporting messages sent to Root
>

2020-04-22 19:31:36

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 1/4] PCI: dra7xx: Don't select CONFIG_PCI_DRA7XX_HOST by default

On Tue, Apr 14, 2020 at 07:12:41PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> Drivers should not be selected by default because that bloats the kernel
> for people who don't need them.
>
> Remove the "default y" for CONFIG_PCI_DRA7XX_HOST.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> Cc: Kishon Vijay Abraham I <[email protected]>
> Cc: [email protected]
> ---
> drivers/pci/controller/dwc/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 03dcaf65d159..ea335ee7ca8e 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -26,7 +26,6 @@ config PCI_DRA7XX_HOST
> depends on OF && HAS_IOMEM && TI_PIPE3
> select PCIE_DW_HOST
> select PCI_DRA7XX
> - default y

Perhaps 'default y if SOC_DRA7XX'?

> help
> Enables support for the PCIe controller in the DRA7xx SoC to work in
> host mode. There are two instances of PCIe controller in DRA7xx.
> --
> 2.26.0.110.g2183baf09c-goog
>

2020-04-24 19:32:00

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 1/4] PCI: dra7xx: Don't select CONFIG_PCI_DRA7XX_HOST by default

On Wed, Apr 22, 2020 at 02:29:57PM -0500, Rob Herring wrote:
> On Tue, Apr 14, 2020 at 07:12:41PM -0500, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <[email protected]>
> >
> > Drivers should not be selected by default because that bloats the kernel
> > for people who don't need them.
> >
> > Remove the "default y" for CONFIG_PCI_DRA7XX_HOST.
> >
> > Signed-off-by: Bjorn Helgaas <[email protected]>
> > Cc: Kishon Vijay Abraham I <[email protected]>
> > Cc: [email protected]
> > ---
> > drivers/pci/controller/dwc/Kconfig | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> > index 03dcaf65d159..ea335ee7ca8e 100644
> > --- a/drivers/pci/controller/dwc/Kconfig
> > +++ b/drivers/pci/controller/dwc/Kconfig
> > @@ -26,7 +26,6 @@ config PCI_DRA7XX_HOST
> > depends on OF && HAS_IOMEM && TI_PIPE3
> > select PCIE_DW_HOST
> > select PCI_DRA7XX
> > - default y
>
> Perhaps 'default y if SOC_DRA7XX'?

Good idea, I did that.

2020-04-24 19:40:21

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 0/4] PCI: Don't select Kconfig symbols by default

On Tue, Apr 14, 2020 at 07:12:40PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> A few Kconfig symbols snuck in with "default y". In general we don't want
> that because we don't want to bloat the kernel with unnecessary drivers.
>
> Remove the ones that are optional.
>
> There are a few left, but they depend on something else that seems like the
> real choice, e.g., XEN_PCIDEV_FRONTEND depends on XEN and PCI_XGENE_MSI
> depends on PCI_XGENE.
>
> Bjorn Helgaas (4):
> PCI: dra7xx: Don't select CONFIG_PCI_DRA7XX_HOST by default
> PCI: keystone: Don't select CONFIG_PCI_KEYSTONE_HOST by default
> PCI/AER: Don't select CONFIG_PCIEAER by default
> PCI/ASPM: Don't select CONFIG_PCIEASPM by default
>
> drivers/pci/controller/dwc/Kconfig | 2 --
> drivers/pci/pcie/Kconfig | 2 --
> 2 files changed, 4 deletions(-)

Applied with Sathy's reviewed-by on the AER patch and the tweak Rob
suggested to the dra7xx one to pci/kconfig for v5.8.

2020-06-01 16:34:10

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 4/4] PCI/ASPM: Don't select CONFIG_PCIEASPM by default

On Tue, Apr 14, 2020 at 07:12:44PM -0500, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> PCIe Active State Power Management (ASPM) is optional and there's no need
> for it to be selected by default.
>
> Remove the "default y" for CONFIG_PCIEASPM.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> Cc: Heiner Kallweit <[email protected]>

I dropped this patch for now.

Without CONFIG_PCIEASPM, Linux doesn't request control of *any*
features via _OSC (see ACPI_PCIE_REQ_SUPPORT), which means we can't
use PCIe PME to resume from runtime suspend.

https://bugzilla.redhat.com/show_bug.cgi?id=638912
https://lore.kernel.org/r/[email protected]

> ---
> drivers/pci/pcie/Kconfig | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
> index 9cd31331aee9..5b7b460a8a98 100644
> --- a/drivers/pci/pcie/Kconfig
> +++ b/drivers/pci/pcie/Kconfig
> @@ -62,7 +62,6 @@ config PCIE_ECRC
> #
> config PCIEASPM
> bool "PCI Express ASPM control" if EXPERT
> - default y
> help
> This enables OS control over PCI Express ASPM (Active State
> Power Management) and Clock Power Management. ASPM supports
> --
> 2.26.0.110.g2183baf09c-goog
>