Skip to content

Commit 88af9b1

Browse files
committed
Merge tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These fix a frequency limit issue in the ACPI processor performance library code, fix a few issues in the ACPICA code, improve Crystal Cove support in the ACPI PMIC driver, fix string handling in the ACPI battery driver, add IRQ override quirks for a few machines more, fix other assorted problems and clean up code and documentation. Specifics: - Drop port I/O validation for some regions to avoid AML failures due to rejections of legitimate port I/O writes (Mario Limonciello) - Constify acpi_get_handle() pathname argument to allow its callers to pass const pathnames to it (Sakari Ailus) - Prevent acpi_ns_simple_repair() from crashing in some cases when AE_AML_NO_RETURN_VALUE should be returned (Daniil Tatianin) - Fix typo in CDAT DSMAS struct definition (Lukas Wunner) - Drop an unnecessary (void *) conversion from the ACPI processor driver (Zhou jie) - Modify the ACPI processor performance library code to use the "no limit" frequency QoS as appropriate and adjust the intel_pstate driver accordingly (Rafael Wysocki) - Add support for NBFT to the ACPI table parser (Stuart Hayes) - Introduce list of known non-PNP devices to avoid enumerating some of them as PNP devices (Rafael Wysocki) - Add x86 ACPI paths to the ACPI entry in MAINTAINERS to allow scripts to report the actual maintainers information (Rafael Wysocki) - Add two more entries to the ACPI IRQ override quirk list (Adam Niederer, Werner Sembach) - Add a pmic_i2c_address entry for Intel Bay Trail Crystal Cove to allow intel_soc_pmic_exec_mipi_pmic_seq_element() to be used with the Bay Trail Crystal Cove PMIC OpRegion driver (Hans de Goede) - Add comments with DSDT power OpRegion field names to the ACPI PMIC driver (Hans de Goede) - Fix string termination handling in the ACPI battery driver (Armin Wolf) - Limit error type to 32-bit width in the ACPI APEI error injection code (Shuai Xue) - Fix Lenovo Ideapad Z570 DMI match in the ACPI backlight driver (Hans de Goede) - Silence missing prototype warnings in some places in the ACPI-related code (Ammar Faizi) - Make kobj_type structures used in the ACPI code constant (Thomas Weißschuh) - Correct spelling in firmware-guide/ACPI (Randy Dunlap) - Clarify the meaning of Explicit and Implicit in the _DSD GPIO properties documentation (Andy Shevchenko) - Fix some kernel-doc comments in the ACPI CPPC library code (Yang Li)" * tag 'acpi-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits) ACPI: make kobj_type structures constant Documentation: firmware-guide: gpio-properties: Clarify Explicit and Implicit ACPICA: Fix typo in CDAT DSMAS struct definition ACPI: resource: Do IRQ override on all TongFang GMxRGxx ACPI: resource: Add IRQ overrides for MAINGEAR Vector Pro 2 models ACPI: CPPC: Fix some kernel-doc comments ACPI: video: Fix Lenovo Ideapad Z570 DMI match Documentation: firmware-guide/ACPI: correct spelling ACPI: PMIC: Add comments with DSDT power opregion field names ACPI: battery: Increase maximum string length ACPI: battery: Fix buffer overread if not NUL-terminated ACPI: APEI: EINJ: Limit error type to 32-bit width MAINTAINERS: Add x86 ACPI paths to the ACPI entry ACPI: battery: Fix missing NUL-termination with large strings ACPI: PNP: Introduce list of known non-PNP devices ACPICA: nsrepair: handle cases without a return value correctly ACPI: Silence missing prototype warnings cpufreq: intel_pstate: Drop ACPI _PSS states table patching ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily ACPI: processor: perflib: Use the "no limit" frequency QoS ...
2 parents 2504ba8 + f32309c commit 88af9b1

25 files changed

+163
-83
lines changed

Documentation/firmware-guide/acpi/acpi-lid.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ state upon the last _LID evaluation. There won't be difference when the
3434
_LID control method is evaluated during the runtime, the problem is its
3535
initial returning value. When the AML tables implement this control method
3636
with cached value, the initial returning value is likely not reliable.
37-
There are platforms always retun "closed" as initial lid state.
37+
There are platforms always return "closed" as initial lid state.
3838

3939
Restrictions of the lid state change notifications
4040
==================================================

Documentation/firmware-guide/acpi/gpio-properties.rst

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,30 @@ state of the output pin which driver should use during its initialization.
6767
Linux tries to use common sense here and derives the state from the bias
6868
and polarity settings. The table below shows the expectations:
6969

70-
========= ============= ==============
71-
Pull Bias Polarity Requested...
72-
========= ============= ==============
73-
Implicit x AS IS (assumed firmware configured for us)
74-
Explicit x (no _DSD) as Pull Bias (Up == High, Down == Low),
75-
assuming non-active (Polarity = !Pull Bias)
76-
Down Low as low, assuming active
77-
Down High as low, assuming non-active
78-
Up Low as high, assuming non-active
79-
Up High as high, assuming active
80-
========= ============= ==============
70+
+-------------+-------------+-----------------------------------------------+
71+
| Pull Bias | Polarity | Requested... |
72+
+=============+=============+===============================================+
73+
| Implicit |
74+
+-------------+-------------+-----------------------------------------------+
75+
| **Default** | x | AS IS (assumed firmware configured it for us) |
76+
+-------------+-------------+-----------------------------------------------+
77+
| Explicit |
78+
+-------------+-------------+-----------------------------------------------+
79+
| **None** | x | AS IS (assumed firmware configured it for us) |
80+
| | | with no Pull Bias |
81+
+-------------+-------------+-----------------------------------------------+
82+
| **Up** | x (no _DSD) | |
83+
| +-------------+ as high, assuming non-active |
84+
| | Low | |
85+
| +-------------+-----------------------------------------------+
86+
| | High | as high, assuming active |
87+
+-------------+-------------+-----------------------------------------------+
88+
| **Down** | x (no _DSD) | |
89+
| +-------------+ as low, assuming non-active |
90+
| | High | |
91+
| +-------------+-----------------------------------------------+
92+
| | Low | as low, assuming active |
93+
+-------------+-------------+-----------------------------------------------+
8194

8295
That said, for our above example the both GPIOs, since the bias setting
8396
is explicit and _DSD is present, will be treated as active with a high

Documentation/firmware-guide/acpi/namespace.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Description Table). The XSDT always points to the FADT (Fixed ACPI
3131
Description Table) using its first entry, the data within the FADT
3232
includes various fixed-length entries that describe fixed ACPI features
3333
of the hardware. The FADT contains a pointer to the DSDT
34-
(Differentiated System Descripition Table). The XSDT also contains
34+
(Differentiated System Description Table). The XSDT also contains
3535
entries pointing to possibly multiple SSDTs (Secondary System
3636
Description Table).
3737

MAINTAINERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
361361
F: Documentation/ABI/testing/configfs-acpi
362362
F: Documentation/ABI/testing/sysfs-bus-acpi
363363
F: Documentation/firmware-guide/acpi/
364+
F: arch/x86/kernel/acpi/
365+
F: arch/x86/pci/acpi.c
364366
F: drivers/acpi/
365367
F: drivers/pci/*/*acpi*
366368
F: drivers/pci/*acpi*
@@ -19918,7 +19920,8 @@ L: [email protected]
1991819920
S: Supported
1991919921
B: https://bugzilla.kernel.org
1992019922
F: Documentation/power/
19921-
F: arch/x86/kernel/acpi/
19923+
F: arch/x86/kernel/acpi/sleep*
19924+
F: arch/x86/kernel/acpi/wakeup*
1992219925
F: drivers/base/power/
1992319926
F: include/linux/freezer.h
1992419927
F: include/linux/pm.h

drivers/acpi/acpi_lpit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/acpi.h>
1111
#include <asm/msr.h>
1212
#include <asm/tsc.h>
13+
#include "internal.h"
1314

1415
struct lpit_residency_info {
1516
struct acpi_generic_address gaddr;

drivers/acpi/acpi_pnp.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,22 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc
348348
return false;
349349
}
350350

351+
/*
352+
* If one of the device IDs below is present in the list of device IDs of a
353+
* given ACPI device object, the PNP scan handler will not attach to that
354+
* object, because there is a proper non-PNP driver in the kernel for the
355+
* device represented by it.
356+
*/
357+
static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
358+
{"INTC1080"},
359+
{"INTC1081"},
360+
{""},
361+
};
362+
351363
static int acpi_pnp_attach(struct acpi_device *adev,
352364
const struct acpi_device_id *id)
353365
{
354-
return 1;
366+
return !!acpi_match_device_ids(adev, acpi_nonpnp_device_ids);
355367
}
356368

357369
static struct acpi_scan_handler acpi_pnp_handler = {

drivers/acpi/acpica/hwvalid.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width);
2323
*
2424
* The table is used to implement the Microsoft port access rules that
2525
* first appeared in Windows XP. Some ports are always illegal, and some
26-
* ports are only illegal if the BIOS calls _OSI with a win_XP string or
27-
* later (meaning that the BIOS itelf is post-XP.)
26+
* ports are only illegal if the BIOS calls _OSI with nothing newer than
27+
* the specific _OSI strings.
2828
*
2929
* This provides ACPICA with the desired port protections and
3030
* Microsoft compatibility.
@@ -145,7 +145,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
145145

146146
/* Port illegality may depend on the _OSI calls made by the BIOS */
147147

148-
if (acpi_gbl_osi_data >= port_info->osi_dependency) {
148+
if (port_info->osi_dependency == ACPI_ALWAYS_ILLEGAL ||
149+
acpi_gbl_osi_data == port_info->osi_dependency) {
149150
ACPI_DEBUG_PRINT((ACPI_DB_VALUES,
150151
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n",
151152
ACPI_FORMAT_UINT64(address),

drivers/acpi/acpica/nsrepair.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
181181
* Try to fix if there was no return object. Warning if failed to fix.
182182
*/
183183
if (!return_object) {
184-
if (expected_btypes && (!(expected_btypes & ACPI_RTYPE_NONE))) {
185-
if (package_index != ACPI_NOT_PACKAGE_ELEMENT) {
184+
if (expected_btypes) {
185+
if (!(expected_btypes & ACPI_RTYPE_NONE) &&
186+
package_index != ACPI_NOT_PACKAGE_ELEMENT) {
186187
ACPI_WARN_PREDEFINED((AE_INFO,
187188
info->full_pathname,
188189
ACPI_WARN_ALWAYS,
@@ -196,14 +197,15 @@ acpi_ns_simple_repair(struct acpi_evaluate_info *info,
196197
if (ACPI_SUCCESS(status)) {
197198
return (AE_OK); /* Repair was successful */
198199
}
199-
} else {
200+
}
201+
202+
if (expected_btypes != ACPI_RTYPE_NONE) {
200203
ACPI_WARN_PREDEFINED((AE_INFO,
201204
info->full_pathname,
202205
ACPI_WARN_ALWAYS,
203206
"Missing expected return value"));
207+
return (AE_AML_NO_RETURN_VALUE);
204208
}
205-
206-
return (AE_AML_NO_RETURN_VALUE);
207209
}
208210
}
209211

drivers/acpi/acpica/nsxfname.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
4444

4545
acpi_status
4646
acpi_get_handle(acpi_handle parent,
47-
acpi_string pathname, acpi_handle *ret_handle)
47+
const char *pathname, acpi_handle *ret_handle)
4848
{
4949
acpi_status status;
5050
struct acpi_namespace_node *node = NULL;

drivers/acpi/apei/einj.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,10 @@ static int error_type_set(void *data, u64 val)
616616
u32 available_error_type = 0;
617617
u32 tval, vendor;
618618

619+
/* Only low 32 bits for error type are valid */
620+
if (val & GENMASK_ULL(63, 32))
621+
return -EINVAL;
622+
619623
/*
620624
* Vendor defined types have 0x80000000 bit set, and
621625
* are not enumerated by ACPI_EINJ_GET_ERROR_TYPE

0 commit comments

Comments
 (0)