Skip to contentSkip to conversation

ACPI / LPSS: Make PCI dependency explicit

PATCH Superseded Sinan Kaya 4 participants 20 messages Dec 23, 2018 – Jan 2, 2019 1 message not in the archive

Subsystems (12)
DRM drivers x86 Sound DRM misc +8 more subsystems

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Sinan Kaya

author
#1 lore raw

PATCH v3 1/11 ACPI / LPSS: Make PCI dependency explicit

In reply to a message not in the archive

This code depends on PCI. Compile only when PCI is present.

---
 drivers/acpi/Makefile   | 3 ++-
 drivers/acpi/internal.h | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/acpi/Makefile +2 -1
index 7c6afc111d76..bb857421c2e8 100644
@@ -41,7 +41,8 @@ acpi-y				+= ec.o
 acpi-$(CONFIG_ACPI_DOCK)	+= dock.o
 acpi-$(CONFIG_PCI)		+= pci_root.o pci_link.o pci_irq.o
 obj-$(CONFIG_ACPI_MCFG)		+= pci_mcfg.o
-acpi-y				+= acpi_lpss.o acpi_apd.o
+acpi-$(CONFIG_PCI)		+= acpi_lpss.o
+acpi-y				+= acpi_apd.o
 acpi-y				+= acpi_platform.o
 acpi-y				+= acpi_pnp.o
 acpi-$(CONFIG_ARM_AMBA)	+= acpi_amba.o
drivers/acpi/internal.h +4 -0
index 7e6952edb5b0..6a9e1fb8913a 100644
@@ -81,7 +81,11 @@ void acpi_debugfs_init(void);
 #else
 static inline void acpi_debugfs_init(void) { return; }
 #endif
+#ifdef CONFIG_PCI
 void acpi_lpss_init(void);
+#else
+static inline void acpi_lpss_init(void) {}
+#endif
 
 void acpi_apd_init(void);
 
Signature · 1 line
2.19.0
author
#2 lore raw

PATCH v3 2/11 ata: make PCI dependency explicit for PATA_ACPI

In reply to a message not in the archive

PATA_ACPI is a PCI device driver but the PCI dependency has not been explicitly called out.

---
 drivers/ata/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/Kconfig +1 -1
index 4ca7a6b4eaae..8218db17ebdb 100644
@@ -1091,7 +1091,7 @@ comment "Generic fallback / legacy drivers"
 
 config PATA_ACPI
 	tristate "ACPI firmware driver for PATA"
-	depends on ATA_ACPI && ATA_BMDMA
+	depends on ATA_ACPI && ATA_BMDMA && PCI
 	help
 	  This option enables an ACPI method driver which drives
 	  motherboard PATA controller interfaces through the ACPI
Signature · 1 line
2.19.0
author
#3 lore raw

PATCH v3 3/11 vga-switcheroo: make PCI dependency explicit

In reply to a message not in the archive

This driver depends on the PCI infrastructure but the dependency has not been explicitly called out.

---
 drivers/gpu/vga/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/vga/Kconfig +1 -0
index b677e5d524e6..d5f1d8e1c6f8 100644
@@ -21,6 +21,7 @@ config VGA_SWITCHEROO
 	bool "Laptop Hybrid Graphics - GPU switching support"
 	depends on X86
 	depends on ACPI
+	depends on PCI
 	select VGA_ARB
 	help
 	  Many laptops released in 2008/9/10 have two GPUs with a multiplexer
Signature · 6 lines
2.19.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#4 lore raw

PATCH v3 4/11 platform/x86: intel_ips: make PCI dependency explicit

In reply to a message not in the archive

ipss driver is a PCI device driver but this has not been mentioned anywhere in Kconfig.

---
 drivers/platform/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/Kconfig +1 -1
index e3b62c2ee8d1..b36ea14b41ad 100644
@@ -1009,7 +1009,7 @@ config INTEL_MFLD_THERMAL
 
 config INTEL_IPS
 	tristate "Intel Intelligent Power Sharing"
-	depends on ACPI
+	depends on ACPI && PCI
 	---help---
 	  Intel Calpella platforms support dynamic power sharing between the
 	  CPU and GPU, maximizing performance in a given TDP.  This driver,
Signature · 1 line
2.19.0
author
#5 lore raw

PATCH v3 5/11 platform/x86: intel_pmc: Make PCI dependency explicit

In reply to a message not in the archive

Code relies on PCI for execution. Specify this in the Kconfig.

---
 drivers/platform/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/Kconfig +1 -1
index b36ea14b41ad..7afb96cb1cd6 100644
@@ -1174,7 +1174,7 @@ config INTEL_SMARTCONNECT
 
 config INTEL_PMC_IPC
 	tristate "Intel PMC IPC Driver"
-	depends on ACPI
+	depends on ACPI && PCI
 	---help---
 	This driver provides support for PMC control on some Intel platforms.
 	The PMC is an ARC processor which defines IPC commands for communication
Signature · 1 line
2.19.0
author
#6 lore raw

PATCH v3 6/11 apple-gmux: Make PCI dependency explicit

In reply to a message not in the archive

This driver depends on the PCI infrastructure but the dependency has not been explicitly called out.

---
 drivers/platform/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/Kconfig +1 -0
index 7afb96cb1cd6..89f4b86244a7 100644
@@ -1136,6 +1136,7 @@ config SAMSUNG_Q10
 config APPLE_GMUX
 	tristate "Apple Gmux Driver"
 	depends on ACPI
+	depends on PCI
 	depends on PNP
 	depends on BACKLIGHT_CLASS_DEVICE
 	depends on BACKLIGHT_APPLE=n || BACKLIGHT_APPLE
Signature · 1 line
2.19.0
author
#7 lore raw

PATCH v3 7/11 drivers: thermal: int3406_thermal: Make PCI dependency explicit

In reply to a message not in the archive

Need CONFIG_PCI to be set in order to be able to use this driver.

---
 drivers/thermal/intel/int340x_thermal/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/Kconfig +1 -1
index 0582bd12a239..fba1976d5f8d 100644
@@ -31,7 +31,7 @@ if INT340X_THERMAL
 
 config INT3406_THERMAL
 	tristate "ACPI INT3406 display thermal driver"
-	depends on ACPI_VIDEO
+	depends on ACPI_VIDEO && PCI
 	help
 	  The display thermal device represents the LED/LCD display panel
 	  that may or may not include touch support. The main function of
Signature · 1 line
2.19.0
author
#8 lore raw

PATCH v3 8/11 ASoC: Intel: atom: Make PCI dependency explicit

In reply to a message not in the archive

Code does unconditional select for IOSF_MBI. IOSF_MBI driver depends on CONFIG_PCI set but this is not specified anywhere.

---
 sound/soc/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/Kconfig +1 -1
index 2fd1b61e8331..b0764b2fe001 100644
@@ -91,7 +91,7 @@ config SND_SST_ATOM_HIFI2_PLATFORM_PCI
 config SND_SST_ATOM_HIFI2_PLATFORM_ACPI
 	tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms"
 	default ACPI
-	depends on X86 && ACPI
+	depends on X86 && ACPI && PCI
 	select SND_SST_IPC_ACPI
 	select SND_SST_ATOM_HIFI2_PLATFORM
 	select SND_SOC_ACPI_INTEL_MATCH
Signature · 1 line
2.19.0
author
#11 lore raw

PATCH v3 9/11 mmc: add PCI dependency into IOSF_MBI

In reply to a message not in the archive

Select IOSF_MBI only when PCI is set.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +1 -1
index e26b8145efb3..4c5f037b246d 100644
@@ -117,7 +117,7 @@ config MMC_RICOH_MMC
 config MMC_SDHCI_ACPI
 	tristate "SDHCI support for ACPI enumerated SDHCI controllers"
 	depends on MMC_SDHCI && ACPI
-	select IOSF_MBI if X86
+	select IOSF_MBI if (X86 && PCI)
 	help
 	  This selects support for ACPI enumerated SDHCI controllers,
 	  identified by ACPI Compatibility ID PNP0D40 or specific
Signature · 1 line
2.19.0
author
#17 lore raw

PATCH v3 10/11 x86: select IOSF_MBI only when CONFIG_PCI is set

In reply to a message not in the archive

Need CONFIG_PCI to be set in order to be able to use IOSF_MBI functionality.

---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -1
index cc4f0c6ee1ed..322a58ababb0 100644
@@ -617,7 +617,7 @@ config X86_INTEL_QUARK
 
 config X86_INTEL_LPSS
 	bool "Intel Low Power Subsystem Support"
-	depends on X86 && ACPI
+	depends on X86 && ACPI && PCI
 	select COMMON_CLK
 	select PINCTRL
 	select IOSF_MBI
Signature · 1 line
2.19.0
author
#20 lore raw

PATCH v3 11/11 drivers: thermal: int340x_thermal: Make PCI dependency explicit

In reply to a message not in the archive

IOSF_CORE depends on PCI. This was never mentioned.

---
 drivers/thermal/intel/int340x_thermal/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/Kconfig +1 -1
index fba1976d5f8d..2acddf8fb314 100644
@@ -4,7 +4,7 @@
 
 config INT340X_THERMAL
 	tristate "ACPI INT340X thermal drivers"
-	depends on X86 && ACPI
+	depends on X86 && ACPI && PCI
 	select THERMAL_GOV_USER_SPACE
 	select ACPI_THERMAL_REL
 	select ACPI_FAN
Signature · 1 line
2.19.0
#18 lore raw

Re: [PATCH v3 10/11] x86: select IOSF_MBI only when CONFIG_PCI is set

In reply to Sinan Kaya
Quoted 5 lines · Sinan Kaya

Need CONFIG_PCI to be set in order to be able to use IOSF_MBI functionality.

The subject and changelog here don't match the changes below. Please fix.

Quoted 20 lines
---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -2
index cc4f0c6ee1ed..322a58ababb0 100644
@@ -617,7 +617,7 @@ config X86_INTEL_QUARK
 
 config X86_INTEL_LPSS
        bool "Intel Low Power Subsystem Support"
-       depends on X86 && ACPI
+       depends on X86 && ACPI && PCI
        select COMMON_CLK
        select PINCTRL
        select IOSF_MBI
--

2.19.0

#12 lore raw

Re: [PATCH v3 09/11] mmc: add PCI dependency into IOSF_MBI

In reply to Sinan Kaya
Quoted 13 lines · Sinan Kaya

Select IOSF_MBI only when PCI is set.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +0 -0
index e26b8145efb3..4c5f037b246d 100644

drivers/mmc/host/Kconfig config MMC_RICOH_MMC · line 119

Quoted 3 lines
drivers/mmc/host/Kconfig +0 -0
@@ -117,7 +117,7 @@ config MMC_RICOH_MMC
 config MMC_SDHCI_ACPI
        tristate "SDHCI support for ACPI enumerated SDHCI controllers"
        depends on MMC_SDHCI && ACPI

It should depend on PCI as well, shouldn't it?

As it stands with the patch applied, randconfig can still select it if PCI is unset AFAICS, can't it?

Quoted 6 lines
drivers/mmc/host/Kconfig +1 -2
-       select IOSF_MBI if X86
+       select IOSF_MBI if (X86 && PCI)
        help
          This selects support for ACPI enumerated SDHCI controllers,
          identified by ACPI Compatibility ID PNP0D40 or specific
--
#9 lore raw

Re: [PATCH v3 08/11] ASoC: Intel: atom: Make PCI dependency explicit

In reply to Sinan Kaya
Quoted 2 lines · Sinan Kaya

Code does unconditional select for IOSF_MBI. IOSF_MBI driver depends on CONFIG_PCI set but this is not specified anywhere.

Can you please share the .config that exposes this problem? This hasn't changed in a long time and I wonder why this pops up now. You have similar cases elsewhere, e.g. arch/x86/Kconfig

config X86_INTEL_LPSS
    bool "Intel Low Power Subsystem Support"
    depends on X86 && ACPI
    select COMMON_CLK
    select PINCTRL
    select IOSF_MBI

or for the MMC.

config MMC_SDHCI_ACPI
    tristate "SDHCI support for ACPI enumerated SDHCI controllers" depends on MMC_SDHCI && ACPI
    select IOSF_MBI if X86

The use of IOSF_MBI is only for the Baytrail-CR detection and there are already in-flight patches to change the code and move it to a helper.

My understanding is that for compilation you only need CONFIG_x86 since there are fall-back routines available in iosf_mbi.h

Thanks!

Quoted 19 lines
---
  sound/soc/intel/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/Kconfig +1 -1
index 2fd1b61e8331..b0764b2fe001 100644
@@ -91,7 +91,7 @@ config SND_SST_ATOM_HIFI2_PLATFORM_PCI
  config SND_SST_ATOM_HIFI2_PLATFORM_ACPI
  	tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms"
  	default ACPI
-	depends on X86 && ACPI
+	depends on X86 && ACPI && PCI
  	select SND_SST_IPC_ACPI
  	select SND_SST_ATOM_HIFI2_PLATFORM
  	select SND_SOC_ACPI_INTEL_MATCH
author
#10 lore raw

Re: [PATCH v3 08/11] ASoC: Intel: atom: Make PCI dependency explicit

Quoted 10 lines · Pierre-Louis Bossart
Quoted 2 lines · Sinan Kaya

Code does unconditional select for IOSF_MBI. IOSF_MBI driver depends on CONFIG_PCI set but this is not specified anywhere.

Can you please share the .config that exposes this problem? This hasn't changed in a long time and I wonder why this pops up now. You have similar cases elsewhere, e.g. arch/x86/Kconfig

Here is the background :

I have a changeset that was added to 4.21-rc1 that decouples ACPI from PCI. PCI was automatically selected when ACPI was chosen before.

This is no longer true.

If a code needs PCI support, it now needs to explicitly state that.

This allows usecase for smaller kernels and component isolation.

Quoted 41 lines

config X86_INTEL_LPSS
bool "Intel Low Power Subsystem Support"
depends on X86 && ACPI
select COMMON_CLK
select PINCTRL
select IOSF_MBI

or for the MMC.

config MMC_SDHCI_ACPI
tristate "SDHCI support for ACPI enumerated SDHCI controllers" depends on MMC_SDHCI && ACPI
select IOSF_MBI if X86

The use of IOSF_MBI is only for the Baytrail-CR detection and there are already in-flight patches to change the code and move it to a helper.

My understanding is that for compilation you only need CONFIG_x86 since there are fall-back routines available in iosf_mbi.h

Thanks!

Quoted 19 lines
---
  sound/soc/intel/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/Kconfig +1 -1
index 2fd1b61e8331..b0764b2fe001 100644
@@ -91,7 +91,7 @@ config SND_SST_ATOM_HIFI2_PLATFORM_PCI
  config SND_SST_ATOM_HIFI2_PLATFORM_ACPI
      tristate "ACPI HiFi2 (Baytrail, Cherrytrail) Platforms"
      default ACPI
-     depends on X86 && ACPI
+     depends on X86 && ACPI && PCI
      select SND_SST_IPC_ACPI
      select SND_SST_ATOM_HIFI2_PLATFORM
      select SND_SOC_ACPI_INTEL_MATCH
author
#13 lore raw

Re: [PATCH v3 09/11] mmc: add PCI dependency into IOSF_MBI

In reply to Rafael J. Wysocki
Quoted 10 lines · Rafael J. Wysocki
Quoted 8 lines · Sinan Kaya

Select IOSF_MBI only when PCI is set.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

drivers/mmc/host/Kconfig config MMC_RICOH_MMC · line 119

Quoted 8 lines
drivers/mmc/host/Kconfig +0 -0
index e26b8145efb3..4c5f037b246d 100644
@@ -117,7 +117,7 @@ config MMC_RICOH_MMC
 config MMC_SDHCI_ACPI
        tristate "SDHCI support for ACPI enumerated SDHCI controllers"
        depends on MMC_SDHCI && ACPI

It should depend on PCI as well, shouldn't it?

I don't think so. The PCI dependency is at IOSF_MBI code so code should select IOSF_MBI only when x86 and pci is defined as below.

This driver does not depend on PCI.

Quoted 2 lines

As it stands with the patch applied, randconfig can still select it if PCI is unset AFAICS, can't it?

True, we also should be careful about separating ACPI from PCI. Someone should be able to define a sdhci acpi object without PCI.

What do you think about this?

Quoted 7 lines
Quoted 7 lines
drivers/mmc/host/Kconfig +1 -2
-       select IOSF_MBI if X86
+       select IOSF_MBI if (X86 && PCI)
        help
          This selects support for ACPI enumerated SDHCI controllers,
          identified by ACPI Compatibility ID PNP0D40 or specific
--
author
#19 lore raw

Re: [PATCH v3 10/11] x86: select IOSF_MBI only when CONFIG_PCI is set

In reply to Rafael J. Wysocki
Quoted 10 lines · Rafael J. Wysocki
Quoted 5 lines · Sinan Kaya

Need CONFIG_PCI to be set in order to be able to use IOSF_MBI functionality.

The subject and changelog here don't match the changes below. Please fix.

Done

Quoted 20 lines
Quoted 20 lines
---
 arch/x86/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/Kconfig +1 -2
index cc4f0c6ee1ed..322a58ababb0 100644
@@ -617,7 +617,7 @@ config X86_INTEL_QUARK
 
 config X86_INTEL_LPSS
        bool "Intel Low Power Subsystem Support"
-       depends on X86 && ACPI
+       depends on X86 && ACPI && PCI
        select COMMON_CLK
        select PINCTRL
        select IOSF_MBI
--

2.19.0

#14 lore raw

Re: [PATCH v3 09/11] mmc: add PCI dependency into IOSF_MBI

In reply to Sinan Kaya
Quoted 24 lines · Sinan Kaya
Quoted 10 lines · Rafael J. Wysocki
Quoted 8 lines · Sinan Kaya

Select IOSF_MBI only when PCI is set.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

drivers/mmc/host/Kconfig config MMC_RICOH_MMC · line 119

Quoted 8 lines
drivers/mmc/host/Kconfig +0 -0
index e26b8145efb3..4c5f037b246d 100644
@@ -117,7 +117,7 @@ config MMC_RICOH_MMC
 config MMC_SDHCI_ACPI
        tristate "SDHCI support for ACPI enumerated SDHCI controllers"
        depends on MMC_SDHCI && ACPI

It should depend on PCI as well, shouldn't it?

Quoted 4 lines

I don't think so. The PCI dependency is at IOSF_MBI code so code should select IOSF_MBI only when x86 and pci is defined as below.

This driver does not depend on PCI.

Are you sure?

Do you know any systems in which to use it without PCI?

#15 lore raw

Re: [PATCH v3 09/11] mmc: add PCI dependency into IOSF_MBI

Quoted 25 lines · Rafael J. Wysocki
Quoted 24 lines · Sinan Kaya
Quoted 21 lines · Rafael J. Wysocki
Quoted 13 lines · Sinan Kaya

Select IOSF_MBI only when PCI is set.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/Kconfig +0 -0
index e26b8145efb3..4c5f037b246d 100644

drivers/mmc/host/Kconfig config MMC_RICOH_MMC · line 119

Quoted 3 lines
drivers/mmc/host/Kconfig +0 -0
@@ -117,7 +117,7 @@ config MMC_RICOH_MMC
 config MMC_SDHCI_ACPI
        tristate "SDHCI support for ACPI enumerated SDHCI controllers"
        depends on MMC_SDHCI && ACPI

It should depend on PCI as well, shouldn't it?

Quoted 9 lines
Quoted 4 lines

I don't think so. The PCI dependency is at IOSF_MBI code so code should select IOSF_MBI only when x86 and pci is defined as below.

This driver does not depend on PCI.

Are you sure?

Do you know any systems in which to use it without PCI?

Qualcomm use it and I don't know if those systems have PCI.
AMD use it but probably also have PCI. And yes Intel systems (just BYT and CHT IIRC) that use this driver will always have PCI.

author
#16 lore raw

Re: [PATCH v3 09/11] mmc: add PCI dependency into IOSF_MBI

Quoted 32 lines · Adrian Hunter
Quoted 30 lines · Rafael J. Wysocki
Quoted 28 lines · Sinan Kaya
Quoted 10 lines · Rafael J. Wysocki
Quoted 8 lines · Sinan Kaya

Select IOSF_MBI only when PCI is set.

---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

drivers/mmc/host/Kconfig config MMC_RICOH_MMC · line 119

Quoted 8 lines
drivers/mmc/host/Kconfig +0 -0
index e26b8145efb3..4c5f037b246d 100644
@@ -117,7 +117,7 @@ config MMC_RICOH_MMC
 config MMC_SDHCI_ACPI
        tristate "SDHCI support for ACPI enumerated SDHCI controllers"
        depends on MMC_SDHCI && ACPI

It should depend on PCI as well, shouldn't it?

I don't think so. The PCI dependency is at IOSF_MBI code so code should select IOSF_MBI only when x86 and pci is defined as below.

This driver does not depend on PCI.

Quoted 8 lines
Quoted 4 lines

Are you sure?

Do you know any systems in which to use it without PCI?

Qualcomm use it and I don't know if those systems have PCI.
AMD use it but probably also have PCI. And yes Intel systems (just BYT and CHT IIRC) that use this driver will always have PCI.

QCOM doesn't use PCI for SDHC.