Commit c0d6586a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI updates from Rafael Wysocki:
 "These update the ACPICA code in the kernel to the most recent upstream
  revision, address some issues related to the ACPI power resources
  management, simplify the enumeration of PCI devices having ACPI
  companions, add new quirks, fix assorted problems, update the
  ACPI-related information in maintainers and clean up code in several
  places.

  Specifics:

   - Update the ACPICA code in the kernel to upstream revision 20210930
     including the following changes:

        - Fix system-wide resume issue caused by evaluating control
          methods too early in the resume path (Rafael Wysocki).

        - Add support for Windows 2020 _OSI string (Mario Limonciello).

        - Add Generic Port Affinity type for SRAT (Alison Schofield).

        - Add disassembly support for the NHLT ACPI table (Bob Moore).

   - Avoid flushing caches before entering C3 type of idle states on AMD
     processors (Deepak Sharma).

   - Avoid enumerating CPUs that are not present and not online-capable
     according to the platform firmware (Mario Limonciello).

   - Add DMI-based mechanism to quirk IRQ overrides and use it for two
     platforms (Hui Wang).

   - Change the configuration of unused ACPI device objects to reflect
     the D3cold power state after enumerating devices (Rafael Wysocki).

   - Update MAINTAINERS information regarding ACPI (Rafael Wysocki).

   - Fix typo in ACPI Kconfig (Masanari Iid).

   - Use sysfs_emit() instead of snprintf() in some places (Qing Wang).

   - Make the association of ACPI device objects with PCI devices more
     straightforward and simplify the code doing that for all devices in
     general (Rafael Wysocki).

   - Use acpi_device_adr() in acpi_find_child_device() instead of
     evaluating _ADR (Rafael Wysocki).

   - Drop duplicate device IDs from PNP device IDs list (Krzysztof
     Kozlowski).

   - Allow acpi_idle_play_dead() to use C3 on AMD processors (Richard
     Gong).

   - Use ACPI_COMPANION() to simplify code in some drivers (Rafael
     Wysocki).

   - Check the states of all ACPI power resources during initialization
     to avoid dealing with power resources in unknown states (Rafael
     Wysocki).

   - Fix ACPI power resource issues related to sharing wakeup power
     resources (Rafael Wysocki).

   - Avoid registering redundant suspend_ops (Rafael Wysocki).

   - Report battery charging state as "full" if it appears to be over
     the design capacity (André Almeida).

   - Quirk GK45 mini PC to skip reading _PSR in the AC driver (Stefan
     Schaeckeler).

   - Mark apei_hest_parse() static (Christoph Hellwig).

   - Relax platform response timeout to 1 second after instructing it to
     inject an error (Shuai Xue).

   - Make the PRM code handle memory allocation and remapping failures
     more gracefully and drop some unnecessary blank lines from that
     code (Aubrey Li).

   - Fix spelling mistake in the ACPI documentation (Colin Ian King)"

* tag 'acpi-5.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (36 commits)
  ACPI: glue: Use acpi_device_adr() in acpi_find_child_device()
  perf: qcom_l2_pmu: ACPI: Use ACPI_COMPANION() directly
  ACPI: APEI: mark apei_hest_parse() static
  ACPI: APEI: EINJ: Relax platform response timeout to 1 second
  gpio-amdpt: ACPI: Use the ACPI_COMPANION() macro directly
  nouveau: ACPI: Use the ACPI_COMPANION() macro directly
  ACPI: resources: Add one more Medion model in IRQ override quirk
  ACPI: AC: Quirk GK45 to skip reading _PSR
  ACPI: PM: sleep: Do not set suspend_ops unnecessarily
  ACPI: PRM: Handle memory allocation and memory remap failure
  ACPI: PRM: Remove unnecessary blank lines
  ACPI: PM: Turn off wakeup power resources on _DSW/_PSW errors
  ACPI: PM: Fix sharing of wakeup power resources
  ACPI: PM: Turn off unused wakeup power resources
  ACPI: PM: Check states of power resources during initialization
  ACPI: replace snprintf() in "show" functions with sysfs_emit()
  ACPI: LPSS: Use ACPI_COMPANION() directly
  ACPI: scan: Release PM resources blocked by unused objects
  ACPI: battery: Accept charges over the design capacity as full
  ACPICA: Update version to 20210930
  ...
parents 33fb4263 90e17eda
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ The ACPI BIOS flow would include an evaluation of _OS, and the AML
interpreter in the kernel would return to it a string identifying the OS:
interpreter in the kernel would return to it a string identifying the OS:


Windows 98, SE: "Microsoft Windows"
Windows 98, SE: "Microsoft Windows"
Windows ME: "Microsoft WindowsME:Millenium Edition"
Windows ME: "Microsoft WindowsME:Millennium Edition"
Windows NT: "Microsoft Windows NT"
Windows NT: "Microsoft Windows NT"


The idea was on a platform tasked with running multiple OS's,
The idea was on a platform tasked with running multiple OS's,
+2 −18
Original line number Original line Diff line number Diff line
@@ -334,7 +334,7 @@ F: drivers/platform/x86/acer-wmi.c
ACPI
ACPI
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	Len Brown <lenb@kernel.org>
R:	Len Brown <lenb@kernel.org>
L:	linux-acpi@vger.kernel.org
L:	linux-acpi@vger.kernel.org
S:	Supported
S:	Supported
W:	https://01.org/linux-acpi
W:	https://01.org/linux-acpi
@@ -355,7 +355,7 @@ F: tools/power/acpi/
ACPI APEI
ACPI APEI
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	"Rafael J. Wysocki" <rafael@kernel.org>
M:	Len Brown <lenb@kernel.org>
R:	Len Brown <lenb@kernel.org>
R:	James Morse <james.morse@arm.com>
R:	James Morse <james.morse@arm.com>
R:	Tony Luck <tony.luck@intel.com>
R:	Tony Luck <tony.luck@intel.com>
R:	Borislav Petkov <bp@alien8.de>
R:	Borislav Petkov <bp@alien8.de>
@@ -378,14 +378,6 @@ F: drivers/acpi/acpica/
F:	include/acpi/
F:	include/acpi/
F:	tools/power/acpi/
F:	tools/power/acpi/
ACPI FAN DRIVER
M:	Zhang Rui <rui.zhang@intel.com>
L:	linux-acpi@vger.kernel.org
S:	Supported
W:	https://01.org/linux-acpi
B:	https://bugzilla.kernel.org
F:	drivers/acpi/fan.c
ACPI FOR ARM64 (ACPI/arm64)
ACPI FOR ARM64 (ACPI/arm64)
M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
M:	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
M:	Hanjun Guo <guohanjun@huawei.com>
M:	Hanjun Guo <guohanjun@huawei.com>
@@ -428,14 +420,6 @@ W: https://01.org/linux-acpi
B:	https://bugzilla.kernel.org
B:	https://bugzilla.kernel.org
F:	drivers/acpi/*thermal*
F:	drivers/acpi/*thermal*
ACPI VIDEO DRIVER
M:	Zhang Rui <rui.zhang@intel.com>
L:	linux-acpi@vger.kernel.org
S:	Supported
W:	https://01.org/linux-acpi
B:	https://bugzilla.kernel.org
F:	drivers/acpi/acpi_video.c
ACPI VIOT DRIVER
ACPI VIOT DRIVER
M:	Jean-Philippe Brucker <jean-philippe@linaro.org>
M:	Jean-Philippe Brucker <jean-philippe@linaro.org>
L:	linux-acpi@vger.kernel.org
L:	linux-acpi@vger.kernel.org
+9 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,7 @@ int acpi_fix_pin2_polarity __initdata;


#ifdef CONFIG_X86_LOCAL_APIC
#ifdef CONFIG_X86_LOCAL_APIC
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
static bool acpi_support_online_capable;
#endif
#endif


#ifdef CONFIG_X86_IO_APIC
#ifdef CONFIG_X86_IO_APIC
@@ -138,6 +139,8 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)


		pr_debug("Local APIC address 0x%08x\n", madt->address);
		pr_debug("Local APIC address 0x%08x\n", madt->address);
	}
	}
	if (madt->header.revision >= 5)
		acpi_support_online_capable = true;


	default_acpi_madt_oem_check(madt->header.oem_id,
	default_acpi_madt_oem_check(madt->header.oem_id,
				    madt->header.oem_table_id);
				    madt->header.oem_table_id);
@@ -239,6 +242,12 @@ acpi_parse_lapic(union acpi_subtable_headers * header, const unsigned long end)
	if (processor->id == 0xff)
	if (processor->id == 0xff)
		return 0;
		return 0;


	/* don't register processors that can not be onlined */
	if (acpi_support_online_capable &&
	    !(processor->lapic_flags & ACPI_MADT_ENABLED) &&
	    !(processor->lapic_flags & ACPI_MADT_ONLINE_CAPABLE))
		return 0;

	/*
	/*
	 * We need to register disabled CPU as well to permit
	 * We need to register disabled CPU as well to permit
	 * counting disabled CPUs. This allows us to size
	 * counting disabled CPUs. This allows us to size
+15 −0
Original line number Original line Diff line number Diff line
@@ -79,6 +79,21 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
		 */
		 */
		flags->bm_control = 0;
		flags->bm_control = 0;
	}
	}
	if (c->x86_vendor == X86_VENDOR_AMD && c->x86 >= 0x17) {
		/*
		 * For all AMD Zen or newer CPUs that support C3, caches
		 * should not be flushed by software while entering C3
		 * type state. Set bm->check to 1 so that kernel doesn't
		 * need to execute cache flush operation.
		 */
		flags->bm_check = 1;
		/*
		 * In current AMD C state implementation ARB_DIS is no longer
		 * used. So set bm_control to zero to indicate ARB_DIS is not
		 * required while entering C3 type state.
		 */
		flags->bm_control = 0;
	}
}
}
EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
EXPORT_SYMBOL(acpi_processor_power_init_bm_check);


+1 −1
Original line number Original line Diff line number Diff line
@@ -71,7 +71,7 @@ config ACPI_DEBUGGER
if ACPI_DEBUGGER
if ACPI_DEBUGGER


config ACPI_DEBUGGER_USER
config ACPI_DEBUGGER_USER
	tristate "Userspace debugger accessiblity"
	tristate "Userspace debugger accessibility"
	depends on DEBUG_FS
	depends on DEBUG_FS
	help
	help
	  Export /sys/kernel/debug/acpi/acpidbg for userspace utilities
	  Export /sys/kernel/debug/acpi/acpidbg for userspace utilities
Loading