Skip to content

Commit

Permalink
Merge tag 'acpi-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These fix an ACPI initialization ordering issue introduced in the 4.17
  time frame and causing functional problems to appear on multiple
  systems and fix some fallout of the recent change to enable building
  kernels with ACPI support and without PCI.

  Specifics:

   - Restore the ACPI initialization ordering changed implicitly by the
     module-level AML handling rework during the 4.17 development cycle
     that caused the EC address space handler based on information from
     ECDT to be set up before loading AML definition blocks, making it
     effectively not accessible by AML on some systems that don't work
     as expected any more (Rafael Wysocki).

   - Add direct dependencies on PCI to Kconfig in multiple places for
     code that depends on both ACPI and PCI, but the PCI dependency was
     implicitly satisfied by the ACPI dependency before, to prevent
     invalid configurations from being created, for example by
     randconfig (Sinan Kaya)"

* tag 'acpi-5.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: EC: Look for ECDT EC after calling acpi_load_tables()
  drivers: thermal: int340x_thermal: Make PCI dependency explicit
  x86/intel/lpss: Make PCI dependency explicit
  platform/x86: apple-gmux: Make PCI dependency explicit
  platform/x86: intel_pmc: Make PCI dependency explicit
  platform/x86: intel_ips: make PCI dependency explicit
  vga-switcheroo: make PCI dependency explicit
  ata: pata_acpi: Make PCI dependency explicit
  ACPI / LPSS: Make PCI dependency explicit
  • Loading branch information
torvalds committed Jan 18, 2019
2 parents 2a8cbf2 + 11ee2a3 commit 6e434bf
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,18 +1054,6 @@ void __init acpi_early_init(void)
goto error0;
}

/*
* ACPI 2.0 requires the EC driver to be loaded and work before
* the EC device is found in the namespace (i.e. before
* acpi_load_tables() is called).
*
* This is accomplished by looking for the ECDT table, and getting
* the EC parameters out of that.
*
* Ignore the result. Not having an ECDT is not fatal.
*/
status = acpi_ec_ecdt_probe();

#ifdef CONFIG_X86
if (!acpi_ioapic) {
/* compatible (0) means level (3) */
Expand Down Expand Up @@ -1142,6 +1130,18 @@ static int __init acpi_bus_init(void)
goto error1;
}

/*
* ACPI 2.0 requires the EC driver to be loaded and work before the EC
* device is found in the namespace.
*
* This is accomplished by looking for the ECDT table and getting the EC
* parameters out of that.
*
* Do that before calling acpi_initialize_objects() which may trigger EC
* address space accesses.
*/
acpi_ec_ecdt_probe();

status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX
Expand Down
4 changes: 4 additions & 0 deletions drivers/acpi/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/vga/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1135,7 +1135,7 @@ config SAMSUNG_Q10

config APPLE_GMUX
tristate "Apple Gmux Driver"
depends on ACPI
depends on ACPI && PCI
depends on PNP
depends on BACKLIGHT_CLASS_DEVICE
depends on BACKLIGHT_APPLE=n || BACKLIGHT_APPLE
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/thermal/intel/int340x_thermal/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e434bf

Please sign in to comment.