More ACPI updates for 5.10-rc1

- Fix ACPICA code build after recent changes related to accessing
    GPE registers (Rafael Wysocki).
 
  - Clean up DPTF part of the ACPI Kconfig (Rafael Wysocki).
 
  - Work around a reboot issue related to RESET_REG (Zhang Rui).
 
  - Prevent ACPI debug module from attemtping to run (and crashing)
    when ACPI is disabled (Jamie Iles).
 
  - Drop confusing comment from the ACPI processor driver (Alex Hung).
 
  - Drop a few unreachable break statements (Tom Rix).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl+TEBMSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRx28QP/iGAvDO/bKN8YTbs2QHknwoSCm5m/+ac
 GsjO0CmvvtszeDW8saVOuvKCFHglVXKOoLhDWTU3DC9DMQdPpFrvUw4541ocVfFj
 v8kPaOfz2bbOuxnCgHsCJ/cc4VvRFbT7MvK7zsOBr3usdoTSo793MIS84UJxrrFR
 WMr/DGJesPSRXuMafoMEJCqDufNA4aEdIC0ouJrCe9mMGWlj2UyJwRx/DY3W/2JX
 wdb3cB5XQ8AOfBy1aRI8FkFEoysAnbQkAels4Sg6sspyX/0wEsbwJINPkkYRx9Cf
 bjXbrbIMSdjrVd7xT9aIYTGrQ0C5YebmZbKKGt8Gygn1MIE/sQiWNWxX350by0Zy
 S99K7PtXtiv5+gbpoJiF6SVrDh7Pv1nzPIl0tfjjWHKfKh+tYXZhpnznZ0CEtuSY
 5pOllbYzE/5YV1Liv3E+C/i0/mbKtC0PPSKUlfshn3Uqphgx+PfB47/iswpEV9vg
 FAU/ALkU8vC1cAutI1WQs9q5R7SCEbikBD8fTLxucovxToWv0oxTnlPOYjh88fcK
 rdPPPj6uu+sb2crBDwxcrvTithzHUlGhHwikg5yxfTUHuCbX7hOA7ZttPisw+q0B
 ujyJA8Pssgt2RLrs4TllSPzcB6HjvBV+/yusrVLomWoKaJFEUesQz1O3CkIYztOG
 6gjB5UALU9+Q
 =yEtH
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull more ACPI updates from Rafael Wysocki:
 "These include an ACPICA code build fix related to recent GPE register
  access changes, a Kconfig cleanup related to the Dynamic Platform and
  Thremal Framework (DPTF) support, a reboot issue workaround, a debug
  module fix and a couple of janitorial changes.

  Specifics:

   - Fix ACPICA code build after recent changes related to accessing GPE
     registers (Rafael Wysocki).

   - Clean up DPTF part of the ACPI Kconfig (Rafael Wysocki).

   - Work around a reboot issue related to RESET_REG (Zhang Rui).

   - Prevent ACPI debug module from attemtping to run (and crashing)
     when ACPI is disabled (Jamie Iles).

   - Drop confusing comment from the ACPI processor driver (Alex Hung).

   - Drop a few unreachable break statements (Tom Rix)"

* tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: utils: remove unreachable breaks
  ACPICA: Add missing type casts in GPE register access code
  ACPI: DPTF: Add ACPI_DPTF Kconfig menu
  ACPI: DPTF: Fix participant driver names
  ACPI: processor: remove comment regarding string _UID support
  ACPI: reboot: Avoid racing after writing to ACPI RESET_REG
  ACPI: debug: don't allow debugging when ACPI is disabled
This commit is contained in:
Linus Torvalds 2020-10-23 16:38:36 -07:00
commit b76f733c3f
8 changed files with 42 additions and 14 deletions

View File

@ -749,6 +749,9 @@ static int __init acpi_aml_init(void)
{
int ret;
if (acpi_disabled)
return -ENODEV;
/* Initialize AML IO interface */
mutex_init(&acpi_aml_io.lock);
init_waitqueue_head(&acpi_aml_io.wait);

View File

@ -264,7 +264,6 @@ static int acpi_processor_get_info(struct acpi_device *device)
} else {
/*
* Declared with "Device" statement; match _UID.
* Note that we don't handle string _UIDs yet.
*/
status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID,
NULL, &value);

View File

@ -47,7 +47,7 @@ acpi_status acpi_hw_gpe_read(u64 *value, struct acpi_gpe_address *reg)
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
#ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
*value = (u64)ACPI_GET8(reg->address);
*value = (u64)ACPI_GET8((unsigned long)reg->address);
return_ACPI_STATUS(AE_OK);
#else
return acpi_os_read_memory((acpi_physical_address)reg->address,
@ -82,7 +82,7 @@ acpi_status acpi_hw_gpe_write(u64 value, struct acpi_gpe_address *reg)
{
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
#ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
ACPI_SET8(reg->address, value);
ACPI_SET8((unsigned long)reg->address, value);
return_ACPI_STATUS(AE_OK);
#else
return acpi_os_write_memory((acpi_physical_address)reg->address,

View File

@ -1,7 +1,24 @@
# SPDX-License-Identifier: GPL-2.0
config DPTF_POWER
tristate "DPTF Platform Power Participant"
menuconfig ACPI_DPTF
bool "Intel DPTF (Dynamic Platform and Thermal Framework) Support"
depends on X86
help
Intel Dynamic Platform and Thermal Framework (DPTF) is a platform
level hardware/software solution for power and thermal management.
As a container for multiple power/thermal technologies, DPTF provides
a coordinated approach for different policies to effect the hardware
state of a system.
For more information see:
<https://01.org/intel%C2%AE-dynamic-platform-and-thermal-framework-dptf-chromium-os/overview>
if ACPI_DPTF
config DPTF_POWER
tristate "Platform Power DPTF Participant"
default m
help
This driver adds support for Dynamic Platform and Thermal Framework
(DPTF) Platform Power Participant device (INT3407) support.
@ -16,15 +33,17 @@ config DPTF_POWER
the module will be called dptf_power.
config DPTF_PCH_FIVR
tristate "DPTF PCH FIVR Participant"
depends on X86
tristate "PCH FIVR DPTF Participant"
default m
help
This driver adds support for Dynamic Platform and Thermal Framework
(DPTF) PCH FIVR Participant device support. This driver allows to
switch PCH FIVR (Fully Integrated Voltage Regulator) frequency.
switch the PCH FIVR (Fully Integrated Voltage Regulator) frequency.
This participant is responsible for exposing:
freq_mhz_low_clock
freq_mhz_high_clock
To compile this driver as a module, choose M here:
the module will be called dptf_pch_fivr.
endif

View File

@ -114,7 +114,7 @@ static struct platform_driver pch_fivr_driver = {
.probe = pch_fivr_add,
.remove = pch_fivr_remove,
.driver = {
.name = "DPTF PCH FIVR",
.name = "dptf_pch_fivr",
.acpi_match_table = pch_fivr_device_ids,
},
};

View File

@ -237,7 +237,7 @@ static struct platform_driver dptf_power_driver = {
.probe = dptf_power_add,
.remove = dptf_power_remove,
.driver = {
.name = "DPTF Platform Power",
.name = "dptf_power",
.acpi_match_table = int3407_device_ids,
},
};

View File

@ -3,6 +3,7 @@
#include <linux/pci.h>
#include <linux/acpi.h>
#include <acpi/reboot.h>
#include <linux/delay.h>
#ifdef CONFIG_PCI
static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
@ -66,4 +67,14 @@ void acpi_reboot(void)
acpi_reset();
break;
}
/*
* Some platforms do not shut down immediately after writing to the
* ACPI reset register, and this results in racing with the
* subsequent reboot mechanism.
*
* The 15ms delay has been found to be long enough for the system
* to reboot on the affected platforms.
*/
mdelay(15);
}

View File

@ -104,7 +104,6 @@ acpi_extract_package(union acpi_object *package,
" [%c]\n",
i, format_string[i]);
return AE_BAD_DATA;
break;
}
break;
@ -129,7 +128,6 @@ acpi_extract_package(union acpi_object *package,
" expecting [%c]\n",
i, format_string[i]);
return AE_BAD_DATA;
break;
}
break;
case ACPI_TYPE_LOCAL_REFERENCE:
@ -144,7 +142,6 @@ acpi_extract_package(union acpi_object *package,
" expecting [%c]\n",
i, format_string[i]);
return AE_BAD_DATA;
break;
}
break;
@ -155,7 +152,6 @@ acpi_extract_package(union acpi_object *package,
i));
/* TBD: handle nested packages... */
return AE_SUPPORT;
break;
}
}