Skip to content

Commit b76f733

Browse files
committed
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
2 parents 41f762a + 2818cc7 commit b76f733

8 files changed

Lines changed: 42 additions & 14 deletions

File tree

drivers/acpi/acpi_dbg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,9 @@ static int __init acpi_aml_init(void)
749749
{
750750
int ret;
751751

752+
if (acpi_disabled)
753+
return -ENODEV;
754+
752755
/* Initialize AML IO interface */
753756
mutex_init(&acpi_aml_io.lock);
754757
init_waitqueue_head(&acpi_aml_io.wait);

drivers/acpi/acpi_processor.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ static int acpi_processor_get_info(struct acpi_device *device)
264264
} else {
265265
/*
266266
* Declared with "Device" statement; match _UID.
267-
* Note that we don't handle string _UIDs yet.
268267
*/
269268
status = acpi_evaluate_integer(pr->handle, METHOD_NAME__UID,
270269
NULL, &value);

drivers/acpi/acpica/hwgpe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ acpi_status acpi_hw_gpe_read(u64 *value, struct acpi_gpe_address *reg)
4747

4848
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
4949
#ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
50-
*value = (u64)ACPI_GET8(reg->address);
50+
*value = (u64)ACPI_GET8((unsigned long)reg->address);
5151
return_ACPI_STATUS(AE_OK);
5252
#else
5353
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)
8282
{
8383
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) {
8484
#ifdef ACPI_GPE_USE_LOGICAL_ADDRESSES
85-
ACPI_SET8(reg->address, value);
85+
ACPI_SET8((unsigned long)reg->address, value);
8686
return_ACPI_STATUS(AE_OK);
8787
#else
8888
return acpi_os_write_memory((acpi_physical_address)reg->address,

drivers/acpi/dptf/Kconfig

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
config DPTF_POWER
3-
tristate "DPTF Platform Power Participant"
2+
3+
menuconfig ACPI_DPTF
4+
bool "Intel DPTF (Dynamic Platform and Thermal Framework) Support"
45
depends on X86
6+
help
7+
Intel Dynamic Platform and Thermal Framework (DPTF) is a platform
8+
level hardware/software solution for power and thermal management.
9+
10+
As a container for multiple power/thermal technologies, DPTF provides
11+
a coordinated approach for different policies to effect the hardware
12+
state of a system.
13+
14+
For more information see:
15+
<https://01.org/intel%C2%AE-dynamic-platform-and-thermal-framework-dptf-chromium-os/overview>
16+
17+
if ACPI_DPTF
18+
19+
config DPTF_POWER
20+
tristate "Platform Power DPTF Participant"
21+
default m
522
help
623
This driver adds support for Dynamic Platform and Thermal Framework
724
(DPTF) Platform Power Participant device (INT3407) support.
@@ -16,15 +33,17 @@ config DPTF_POWER
1633
the module will be called dptf_power.
1734

1835
config DPTF_PCH_FIVR
19-
tristate "DPTF PCH FIVR Participant"
20-
depends on X86
36+
tristate "PCH FIVR DPTF Participant"
37+
default m
2138
help
2239
This driver adds support for Dynamic Platform and Thermal Framework
2340
(DPTF) PCH FIVR Participant device support. This driver allows to
24-
switch PCH FIVR (Fully Integrated Voltage Regulator) frequency.
41+
switch the PCH FIVR (Fully Integrated Voltage Regulator) frequency.
2542
This participant is responsible for exposing:
2643
freq_mhz_low_clock
2744
freq_mhz_high_clock
2845

2946
To compile this driver as a module, choose M here:
3047
the module will be called dptf_pch_fivr.
48+
49+
endif

drivers/acpi/dptf/dptf_pch_fivr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static struct platform_driver pch_fivr_driver = {
114114
.probe = pch_fivr_add,
115115
.remove = pch_fivr_remove,
116116
.driver = {
117-
.name = "DPTF PCH FIVR",
117+
.name = "dptf_pch_fivr",
118118
.acpi_match_table = pch_fivr_device_ids,
119119
},
120120
};

drivers/acpi/dptf/dptf_power.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static struct platform_driver dptf_power_driver = {
237237
.probe = dptf_power_add,
238238
.remove = dptf_power_remove,
239239
.driver = {
240-
.name = "DPTF Platform Power",
240+
.name = "dptf_power",
241241
.acpi_match_table = int3407_device_ids,
242242
},
243243
};

drivers/acpi/reboot.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/pci.h>
44
#include <linux/acpi.h>
55
#include <acpi/reboot.h>
6+
#include <linux/delay.h>
67

78
#ifdef CONFIG_PCI
89
static void acpi_pci_reboot(struct acpi_generic_address *rr, u8 reset_value)
@@ -66,4 +67,14 @@ void acpi_reboot(void)
6667
acpi_reset();
6768
break;
6869
}
70+
71+
/*
72+
* Some platforms do not shut down immediately after writing to the
73+
* ACPI reset register, and this results in racing with the
74+
* subsequent reboot mechanism.
75+
*
76+
* The 15ms delay has been found to be long enough for the system
77+
* to reboot on the affected platforms.
78+
*/
79+
mdelay(15);
6980
}

drivers/acpi/utils.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ acpi_extract_package(union acpi_object *package,
104104
" [%c]\n",
105105
i, format_string[i]);
106106
return AE_BAD_DATA;
107-
break;
108107
}
109108
break;
110109

@@ -129,7 +128,6 @@ acpi_extract_package(union acpi_object *package,
129128
" expecting [%c]\n",
130129
i, format_string[i]);
131130
return AE_BAD_DATA;
132-
break;
133131
}
134132
break;
135133
case ACPI_TYPE_LOCAL_REFERENCE:
@@ -144,7 +142,6 @@ acpi_extract_package(union acpi_object *package,
144142
" expecting [%c]\n",
145143
i, format_string[i]);
146144
return AE_BAD_DATA;
147-
break;
148145
}
149146
break;
150147

@@ -155,7 +152,6 @@ acpi_extract_package(union acpi_object *package,
155152
i));
156153
/* TBD: handle nested packages... */
157154
return AE_SUPPORT;
158-
break;
159155
}
160156
}
161157

0 commit comments

Comments
 (0)