Skip to content

Commit 2818cc7

Browse files
committed
Merge branches 'acpi-debug', 'acpi-reboot', 'acpi-processor', 'acpi-dptf' and 'acpi-utils'
* acpi-debug: ACPI: debug: don't allow debugging when ACPI is disabled * acpi-reboot: ACPI: reboot: Avoid racing after writing to ACPI RESET_REG * acpi-processor: ACPI: processor: remove comment regarding string _UID support * acpi-dptf: ACPI: DPTF: Add ACPI_DPTF Kconfig menu ACPI: DPTF: Fix participant driver names * acpi-utils: ACPI: utils: remove unreachable breaks
6 parents 652af65 + 0fada27 + 9a48888 + d85cc66 + d7a4a85 + abcba2e commit 2818cc7

7 files changed

Lines changed: 40 additions & 12 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/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)