2019-11-06 22:26:28

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 0/5] PCI: Clean up PTM message and Kconfig/Makefile nits

From: Bjorn Helgaas <[email protected]>

The "PTM enabled, 4dns granularity" message has an extra "d" in it; remove
that.

Remove the PTM and ASPM Kconfig dependencies on PCIEPORTBUS, since they
don't depend on it.

Fix the Makefile so PTM and ASPM can be built without PCIEPORTBUS.

Bjorn Helgaas (5):
PCI/PTM: Remove spurious "d" from granularity message
PCI/PTM: Remove dependency on PCIEPORTBUS
PCI/ASPM: Remove dependency on PCIEPORTBUS
PCI: Remove PCIe Kconfig dependencies on PCI
PCI: Allow building PCIe things without PCIEPORTBUS

drivers/pci/Makefile | 3 ++-
drivers/pci/pcie/Kconfig | 3 ---
drivers/pci/pcie/ptm.c | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)

--
2.24.0.rc1.363.gb1bccd3e3d-goog


2019-11-06 22:26:32

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 1/5] PCI/PTM: Remove spurious "d" from granularity message

From: Bjorn Helgaas <[email protected]>

The granularity message has an extra "d":

pci 0000:02:00.0: PTM enabled, 4dns granularity

Remove the "d" so the message is simply "PTM enabled, 4ns granularity".

Fixes: 8b2ec318eece ("PCI: Add PTM clock granularity information")
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Jonathan Yong <[email protected]
---
drivers/pci/pcie/ptm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/ptm.c b/drivers/pci/pcie/ptm.c
index 98cfa30f3fae..9361f3aa26ab 100644
--- a/drivers/pci/pcie/ptm.c
+++ b/drivers/pci/pcie/ptm.c
@@ -21,7 +21,7 @@ static void pci_ptm_info(struct pci_dev *dev)
snprintf(clock_desc, sizeof(clock_desc), ">254ns");
break;
default:
- snprintf(clock_desc, sizeof(clock_desc), "%udns",
+ snprintf(clock_desc, sizeof(clock_desc), "%uns",
dev->ptm_granularity);
break;
}
--
2.24.0.rc1.363.gb1bccd3e3d-goog

2019-11-06 22:26:41

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 2/5] PCI/PTM: Remove dependency on PCIEPORTBUS

From: Bjorn Helgaas <[email protected]>

The PTM support does not depend on the portdrv, so remove the Kconfig
dependency.

Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Jonathan Yong <[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 362eb8cfa53b..b0d781d72d1b 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -135,7 +135,6 @@ config PCIE_DPC

config PCIE_PTM
bool "PCI Express Precision Time Measurement support"
- depends on PCIEPORTBUS
help
This enables PCI Express Precision Time Measurement (PTM)
support.
--
2.24.0.rc1.363.gb1bccd3e3d-goog

2019-11-06 22:29:15

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 3/5] PCI/ASPM: Remove dependency on PCIEPORTBUS

From: Bjorn Helgaas <[email protected]>

The ASPM support does not depend on the portdrv, so remove the Kconfig
dependency.

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

diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index b0d781d72d1b..b196ad816129 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -63,7 +63,7 @@ config PCIE_ECRC
#
config PCIEASPM
bool "PCI Express ASPM control" if EXPERT
- depends on PCI && PCIEPORTBUS
+ depends on PCI
default y
help
This enables OS control over PCI Express ASPM (Active State
--
2.24.0.rc1.363.gb1bccd3e3d-goog

2019-11-06 22:29:30

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 4/5] PCI: Remove PCIe Kconfig dependencies on PCI

From: Bjorn Helgaas <[email protected]>

drivers/pci/pcie/Kconfig is only sourced by drivers/pci/Kconfig, and only
when PCI is defined, so there's no need to depend on PCI again. Remove the
unnecessary dependencies.

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

diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index b196ad816129..207dac2fd588 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -4,7 +4,6 @@
#
config PCIEPORTBUS
bool "PCI Express Port Bus support"
- depends on PCI
help
This enables PCI Express Port Bus support. Users can then enable
support for Native Hot-Plug, Advanced Error Reporting, Power
@@ -63,7 +62,6 @@ config PCIE_ECRC
#
config PCIEASPM
bool "PCI Express ASPM control" if EXPERT
- depends on PCI
default y
help
This enables OS control over PCI Express ASPM (Active State
--
2.24.0.rc1.363.gb1bccd3e3d-goog

2019-11-06 22:29:37

by Bjorn Helgaas

[permalink] [raw]
Subject: [PATCH 5/5] PCI: Allow building PCIe things without PCIEPORTBUS

From: Bjorn Helgaas <[email protected]>

Some things in drivers/pci/pcie (aspm.c and ptm.c) do not depend on the
PCIe portdrv, so we should be able to build them even if PCIEPORTBUS is not
selected. Remove the PCIEPORTBUS guard from building pcie/.

Signed-off-by: Bjorn Helgaas <[email protected]>
---
drivers/pci/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 28cdd8c0213a..522d2b974e91 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -7,6 +7,8 @@ obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o \
pci-sysfs.o rom.o setup-res.o irq.o vpd.o \
setup-bus.o vc.o mmap.o setup-irq.o

+obj-$(CONFIG_PCI) += pcie/
+
ifdef CONFIG_PCI
obj-$(CONFIG_PROC_FS) += proc.o
obj-$(CONFIG_SYSFS) += slot.o
@@ -15,7 +17,6 @@ endif

obj-$(CONFIG_OF) += of.o
obj-$(CONFIG_PCI_QUIRKS) += quirks.o
-obj-$(CONFIG_PCIEPORTBUS) += pcie/
obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
obj-$(CONFIG_PCI_MSI) += msi.o
obj-$(CONFIG_PCI_ATS) += ats.o
--
2.24.0.rc1.363.gb1bccd3e3d-goog

2019-11-07 09:30:20

by Andrew Murray

[permalink] [raw]
Subject: Re: [PATCH 1/5] PCI/PTM: Remove spurious "d" from granularity message

On Wed, Nov 06, 2019 at 04:24:17PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> The granularity message has an extra "d":
>
> pci 0000:02:00.0: PTM enabled, 4dns granularity
>
> Remove the "d" so the message is simply "PTM enabled, 4ns granularity".
>
> Fixes: 8b2ec318eece ("PCI: Add PTM clock granularity information")
> Signed-off-by: Bjorn Helgaas <[email protected]>
> Cc: Jonathan Yong <[email protected]
> ---
> drivers/pci/pcie/ptm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/ptm.c b/drivers/pci/pcie/ptm.c
> index 98cfa30f3fae..9361f3aa26ab 100644
> --- a/drivers/pci/pcie/ptm.c
> +++ b/drivers/pci/pcie/ptm.c
> @@ -21,7 +21,7 @@ static void pci_ptm_info(struct pci_dev *dev)
> snprintf(clock_desc, sizeof(clock_desc), ">254ns");
> break;
> default:
> - snprintf(clock_desc, sizeof(clock_desc), "%udns",
> + snprintf(clock_desc, sizeof(clock_desc), "%uns",
> dev->ptm_granularity);
> break;
> }

Reviewed-by: Andrew Murray <[email protected]>

> --
> 2.24.0.rc1.363.gb1bccd3e3d-goog
>

2019-11-07 09:30:40

by Andrew Murray

[permalink] [raw]
Subject: Re: [PATCH 2/5] PCI/PTM: Remove dependency on PCIEPORTBUS

On Wed, Nov 06, 2019 at 04:24:18PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> The PTM support does not depend on the portdrv, so remove the Kconfig
> dependency.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> Cc: Jonathan Yong <[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 362eb8cfa53b..b0d781d72d1b 100644
> --- a/drivers/pci/pcie/Kconfig
> +++ b/drivers/pci/pcie/Kconfig
> @@ -135,7 +135,6 @@ config PCIE_DPC
>
> config PCIE_PTM
> bool "PCI Express Precision Time Measurement support"
> - depends on PCIEPORTBUS
> help
> This enables PCI Express Precision Time Measurement (PTM)
> support.
> --

Reviewed-by: Andrew Murray <[email protected]>

> 2.24.0.rc1.363.gb1bccd3e3d-goog
>

2019-11-07 09:31:06

by Andrew Murray

[permalink] [raw]
Subject: Re: [PATCH 3/5] PCI/ASPM: Remove dependency on PCIEPORTBUS

On Wed, Nov 06, 2019 at 04:24:19PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> The ASPM support does not depend on the portdrv, so remove the Kconfig
> dependency.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> ---
> drivers/pci/pcie/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
> index b0d781d72d1b..b196ad816129 100644
> --- a/drivers/pci/pcie/Kconfig
> +++ b/drivers/pci/pcie/Kconfig
> @@ -63,7 +63,7 @@ config PCIE_ECRC
> #
> config PCIEASPM
> bool "PCI Express ASPM control" if EXPERT
> - depends on PCI && PCIEPORTBUS
> + depends on PCI
> default y
> help
> This enables OS control over PCI Express ASPM (Active State
> --

Reviewed-by: Andrew Murray <[email protected]>

> 2.24.0.rc1.363.gb1bccd3e3d-goog
>

2019-11-07 09:33:46

by Andrew Murray

[permalink] [raw]
Subject: Re: [PATCH 4/5] PCI: Remove PCIe Kconfig dependencies on PCI

On Wed, Nov 06, 2019 at 04:24:20PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> drivers/pci/pcie/Kconfig is only sourced by drivers/pci/Kconfig, and only
> when PCI is defined, so there's no need to depend on PCI again. Remove the
> unnecessary dependencies.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> ---
> drivers/pci/pcie/Kconfig | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
> index b196ad816129..207dac2fd588 100644
> --- a/drivers/pci/pcie/Kconfig
> +++ b/drivers/pci/pcie/Kconfig
> @@ -4,7 +4,6 @@
> #
> config PCIEPORTBUS
> bool "PCI Express Port Bus support"
> - depends on PCI
> help
> This enables PCI Express Port Bus support. Users can then enable
> support for Native Hot-Plug, Advanced Error Reporting, Power
> @@ -63,7 +62,6 @@ config PCIE_ECRC
> #
> config PCIEASPM
> bool "PCI Express ASPM control" if EXPERT
> - depends on PCI
> default y
> help
> This enables OS control over PCI Express ASPM (Active State

Reviewed-by: Andrew Murray <[email protected]>

> --
> 2.24.0.rc1.363.gb1bccd3e3d-goog
>

2019-11-07 09:43:29

by Andrew Murray

[permalink] [raw]
Subject: Re: [PATCH 5/5] PCI: Allow building PCIe things without PCIEPORTBUS

On Wed, Nov 06, 2019 at 04:24:21PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> Some things in drivers/pci/pcie (aspm.c and ptm.c) do not depend on the
> PCIe portdrv, so we should be able to build them even if PCIEPORTBUS is not
> selected. Remove the PCIEPORTBUS guard from building pcie/.
>
> Signed-off-by: Bjorn Helgaas <[email protected]>
> ---
> drivers/pci/Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
> index 28cdd8c0213a..522d2b974e91 100644
> --- a/drivers/pci/Makefile
> +++ b/drivers/pci/Makefile
> @@ -7,6 +7,8 @@ obj-$(CONFIG_PCI) += access.o bus.o probe.o host-bridge.o \
> pci-sysfs.o rom.o setup-res.o irq.o vpd.o \
> setup-bus.o vc.o mmap.o setup-irq.o
>
> +obj-$(CONFIG_PCI) += pcie/
> +
> ifdef CONFIG_PCI
> obj-$(CONFIG_PROC_FS) += proc.o
> obj-$(CONFIG_SYSFS) += slot.o
> @@ -15,7 +17,6 @@ endif
>
> obj-$(CONFIG_OF) += of.o
> obj-$(CONFIG_PCI_QUIRKS) += quirks.o
> -obj-$(CONFIG_PCIEPORTBUS) += pcie/
> obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
> obj-$(CONFIG_PCI_MSI) += msi.o
> obj-$(CONFIG_PCI_ATS) += ats.o

Reviewed-by: Andrew Murray <[email protected]>

> --
> 2.24.0.rc1.363.gb1bccd3e3d-goog
>

2019-11-07 22:47:39

by Bjorn Helgaas

[permalink] [raw]
Subject: Re: [PATCH 0/5] PCI: Clean up PTM message and Kconfig/Makefile nits

On Wed, Nov 06, 2019 at 04:24:15PM -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <[email protected]>
>
> The "PTM enabled, 4dns granularity" message has an extra "d" in it; remove
> that.
>
> Remove the PTM and ASPM Kconfig dependencies on PCIEPORTBUS, since they
> don't depend on it.
>
> Fix the Makefile so PTM and ASPM can be built without PCIEPORTBUS.
>
> Bjorn Helgaas (5):
> PCI/PTM: Remove spurious "d" from granularity message
> PCI/PTM: Remove dependency on PCIEPORTBUS
> PCI/ASPM: Remove dependency on PCIEPORTBUS
> PCI: Remove PCIe Kconfig dependencies on PCI
> PCI: Allow building PCIe things without PCIEPORTBUS
>
> drivers/pci/Makefile | 3 ++-
> drivers/pci/pcie/Kconfig | 3 ---
> drivers/pci/pcie/ptm.c | 2 +-
> 3 files changed, 3 insertions(+), 5 deletions(-)

Applied with Andrew's reviewed-by to pci/misc for v5.5. Thanks,
Andrew, for looking these over!