Skip to contentSkip to conversation

PCI: Clean up PTM message and Kconfig/Makefile nits

PATCH In review Bjorn Helgaas 2 participants 12 messages Nov 6, 2019 – Nov 7, 2019 PCI

lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
#1 lore raw

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")
Cc Jonathan Yong <[email protected]
---
 drivers/pci/pcie/ptm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/ptm.c +1 -1
index 98cfa30f3fae..9361f3aa26ab 100644
@@ -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;
 	}
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
Reviewed-by on v1 1/5
#2 lore raw

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

Quoted 20 lines · Bjorn Helgaas

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")
Cc Jonathan Yong <[email protected]
---
 drivers/pci/pcie/ptm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/ptm.c +0 -0
index 98cfa30f3fae..9361f3aa26ab 100644

drivers/pci/pcie/ptm.c static void pci_ptm_info(struct pci_dev *dev) · line 27

Quoted 8 lines
drivers/pci/pcie/ptm.c +1 -1
@@ -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;
 	}
Quoted 3 lines
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
#3 lore raw

PATCH 2/5 PCI/PTM: Remove dependency on PCIEPORTBUS

In reply to Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

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

---
 drivers/pci/pcie/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/pcie/Kconfig +0 -1
index 362eb8cfa53b..b0d781d72d1b 100644
@@ -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.
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
Reviewed-by on v1 2/5
#4 lore raw

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

Quoted 17 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

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

---
 drivers/pci/pcie/Kconfig | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/pcie/Kconfig +0 -0
index 362eb8cfa53b..b0d781d72d1b 100644

drivers/pci/pcie/Kconfig config PCIE_DPC · line 140

Quoted 7 lines
drivers/pci/pcie/Kconfig +0 -1
@@ -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.
Quoted 2 lines

2.24.0.rc1.363.gb1bccd3e3d-goog

#5 lore raw

PATCH 3/5 PCI/ASPM: Remove dependency on PCIEPORTBUS

In reply to Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

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

---
 drivers/pci/pcie/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/Kconfig +1 -1
index b0d781d72d1b..b196ad816129 100644
@@ -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
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
Reviewed-by on v1 3/5
#6 lore raw

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

Quoted 16 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

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

---
 drivers/pci/pcie/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/Kconfig +0 -0
index b0d781d72d1b..b196ad816129 100644

drivers/pci/pcie/Kconfig config PCIE_ECRC · line 69

Quoted 8 lines
drivers/pci/pcie/Kconfig +1 -1
@@ -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
Quoted 2 lines

2.24.0.rc1.363.gb1bccd3e3d-goog

#7 lore raw

PATCH 4/5 PCI: Remove PCIe Kconfig dependencies on PCI

In reply to Bjorn Helgaas

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.

---
 drivers/pci/pcie/Kconfig | 2 --
 1 file changed, 2 deletions(-)
drivers/pci/pcie/Kconfig +0 -2
index b196ad816129..207dac2fd588 100644
@@ -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
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
Reviewed-by on v1 4/5
#8 lore raw

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

Quoted 24 lines · Bjorn Helgaas

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.

---
 drivers/pci/pcie/Kconfig | 2 --
 1 file changed, 2 deletions(-)
drivers/pci/pcie/Kconfig +0 -1
index b196ad816129..207dac2fd588 100644
@@ -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

drivers/pci/pcie/Kconfig config PCIE_ECRC · line 67

Quoted 7 lines
drivers/pci/pcie/Kconfig +0 -1
@@ -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
Quoted 3 lines
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
#9 lore raw

PATCH 5/5 PCI: Allow building PCIe things without PCIEPORTBUS

In reply to Bjorn Helgaas

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/.

---
 drivers/pci/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/Makefile +2 -1
index 28cdd8c0213a..522d2b974e91 100644
@@ -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
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
Reviewed-by on v1 5/5
#10 lore raw

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

Quoted 25 lines · Bjorn Helgaas

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/.

---
 drivers/pci/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/Makefile +2 -0
index 28cdd8c0213a..522d2b974e91 100644
@@ -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

drivers/pci/Makefile endif · line 22

Quoted 7 lines
drivers/pci/Makefile +0 -1
@@ -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
Quoted 3 lines
Signature · 1 line
2.24.0.rc1.363.gb1bccd3e3d-goog
#11 lore raw
In reply to Bjorn Helgaas
Quoted 17 lines · Bjorn Helgaas

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

Quoted 4 lines
 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!