Skip to content

Commit 2c20443

Browse files
committed
Merge tag 'acpi-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These revert two ACPICA commits that are not needed any more, rework the property graphs support in ACPI to be more aligned with the analogous DT code, add some new quirks and remove one that isn't needed any more, add a special platform driver to enumerate multiple I2C devices hooked up to the same device object in the ACPI tables and update the battery and button drivers. Specifics: - Revert two ACPICA commits that are not needed any more (Erik Schmauss). - Rework property graph support in the ACPI device properties framework to make it behave more like the analogous DT code and update the documentation of it (Sakari Ailus). - Change the default ACPI device status after initialization to ACPI_STA_DEFAULT instead of 0 (Hans de Goede). - Add a special platform driver for enumerating multiple I2C devices hooked up to the same object in the ACPI tables (Hans de Goede). - Fix the ACPI battery driver to avoid reporting full capacity on systems without support for that and clean it up (Hans de Goede, Dmitry Rozhkov, Lucas Rangit Magasweran). - Add two system wakeup quirks to the ACPI EC driver (Aaron Ma, Mika Westerberg). - Add the touchscreen on Dell Venue Pro 7139 to the list of "always present" devices to make it work (Tristian Celestin). - Revert a special tables handling quirk for Dell XPS 9570 and Precision M5530 which is not needed any more (Kai Heng Feng). - Add support for a new OEM _OSI string to allow system vendors to work around issues with NVidia HDMI audio (Alex Hung). - Prevent the ACPI button driver from reporting excessive system wakeup events and clean it up (Ravi Chandra Sadineni, Randy Dunlap). - Clean up two minor code style issues in the ACPI core and GHES handling on ARM64 (Dongjiu Geng, John Garry, Tom Todd)" * tag 'acpi-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (34 commits) platform/x86: Add ACPI i2c-multi-instantiate pseudo driver ACPI / x86: utils: Remove status workaround from acpi_device_always_present() ACPI / scan: Create platform device for fwnodes with multiple i2c devices ACPI / scan: Initialize status to ACPI_STA_DEFAULT ACPI / EC: Add another entry for Thinkpad X1 Carbon 6th ACPI: bus: Fix a pointer coding style issue arm64 / ACPI: clean the additional checks before calling ghes_notify_sea() ACPI / scan: Add static attribute to indirect_io_hosts[] ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity ACPI / EC: Use ec_no_wakeup on ThinkPad X1 Yoga 3rd ACPI / battery: get rid of negations in conditions ACPI / battery: use specialized print macros ACPI / battery: reorder headers alphabetically ACPI / battery: drop inclusion of init.h ACPI: battery: remove redundant old_present check on insertion ACPI: property: graph: Update graph documentation to use generic references ACPI: property: graph: Improve graph documentation for port/ep numbering ACPI: property: graph: Fix graph documentation ACPI: property: Update documentation for hierarchical data extension 1.1 ACPI: property: Document key numbering for hierarchical data extension refs ...
2 parents b018fc9 + 76f7d6c commit 2c20443

28 files changed

Lines changed: 528 additions & 277 deletions

File tree

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
Copyright (C) 2018 Intel Corporation
2+
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
3+
4+
5+
Referencing hierarchical data nodes
6+
-----------------------------------
7+
8+
ACPI in general allows referring to device objects in the tree only.
9+
Hierarchical data extension nodes may not be referred to directly, hence this
10+
document defines a scheme to implement such references.
11+
12+
A reference consist of the device object name followed by one or more
13+
hierarchical data extension [1] keys. Specifically, the hierarchical data
14+
extension node which is referred to by the key shall lie directly under the
15+
parent object i.e. either the device object or another hierarchical data
16+
extension node.
17+
18+
The keys in the hierarchical data nodes shall consist of the name of the node,
19+
"@" character and the number of the node in hexadecimal notation (without pre-
20+
or postfixes). The same ACPI object shall include the _DSD property extension
21+
with a property "reg" that shall have the same numerical value as the number of
22+
the node.
23+
24+
In case a hierarchical data extensions node has no numerical value, then the
25+
"reg" property shall be omitted from the ACPI object's _DSD properties and the
26+
"@" character and the number shall be omitted from the hierarchical data
27+
extension key.
28+
29+
30+
Example
31+
-------
32+
33+
In the ASL snippet below, the "reference" _DSD property [2] contains a
34+
device object reference to DEV0 and under that device object, a
35+
hierarchical data extension key "node@1" referring to the NOD1 object
36+
and lastly, a hierarchical data extension key "anothernode" referring to
37+
the ANOD object which is also the final target node of the reference.
38+
39+
Device (DEV0)
40+
{
41+
Name (_DSD, Package () {
42+
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
43+
Package () {
44+
Package () { "node@0", NOD0 },
45+
Package () { "node@1", NOD1 },
46+
}
47+
})
48+
Name (NOD0, Package() {
49+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
50+
Package () {
51+
Package () { "random-property", 3 },
52+
}
53+
})
54+
Name (NOD1, Package() {
55+
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
56+
Package () {
57+
Package () { "anothernode", ANOD },
58+
}
59+
})
60+
Name (ANOD, Package() {
61+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
62+
Package () {
63+
Package () { "random-property", 0 },
64+
}
65+
})
66+
}
67+
68+
Device (DEV1)
69+
{
70+
Name (_DSD, Package () {
71+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
72+
Package () {
73+
Package () { "reference", ^DEV0, "node@1", "anothernode" },
74+
}
75+
})
76+
}
77+
78+
Please also see a graph example in graph.txt .
79+
80+
References
81+
----------
82+
83+
[1] Hierarchical Data Extension UUID For _DSD.
84+
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
85+
referenced 2018-07-17.
86+
87+
[2] Device Properties UUID For _DSD.
88+
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
89+
referenced 2016-10-04.

‎Documentation/acpi/dsd/graph.txt‎

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,41 @@ The port and endpoint concepts are very similar to those in Devicetree
3636
[3]. A port represents an interface in a device, and an endpoint
3737
represents a connection to that interface.
3838

39-
All port nodes are located under the device's "_DSD" node in the
40-
hierarchical data extension tree. The property extension related to
41-
each port node must contain the key "port" and an integer value which
42-
is the number of the port. The object it refers to should be called "PRTX",
43-
where "X" is the number of the port.
44-
45-
Further on, endpoints are located under the individual port nodes. The
46-
first hierarchical data extension package list entry of the endpoint
47-
nodes must begin with "endpoint" and must be followed by the number
48-
of the endpoint. The object it refers to should be called "EPXY", where
49-
"X" is the number of the port and "Y" is the number of the endpoint.
50-
51-
Each port node contains a property extension key "port", the value of
52-
which is the number of the port node. The each endpoint is similarly numbered
53-
with a property extension key "endpoint". Port numbers must be unique within a
54-
device and endpoint numbers must be unique within a port.
39+
All port nodes are located under the device's "_DSD" node in the hierarchical
40+
data extension tree. The data extension related to each port node must begin
41+
with "port" and must be followed by the "@" character and the number of the port
42+
as its key. The target object it refers to should be called "PRTX", where "X" is
43+
the number of the port. An example of such a package would be:
44+
45+
Package() { "port@4", PRT4 }
46+
47+
Further on, endpoints are located under the port nodes. The hierarchical
48+
data extension key of the endpoint nodes must begin with
49+
"endpoint" and must be followed by the "@" character and the number of the
50+
endpoint. The object it refers to should be called "EPXY", where "X" is the
51+
number of the port and "Y" is the number of the endpoint. An example of such a
52+
package would be:
53+
54+
Package() { "endpoint@0", EP40 }
55+
56+
Each port node contains a property extension key "port", the value of which is
57+
the number of the port. Each endpoint is similarly numbered with a property
58+
extension key "reg", the value of which is the number of the endpoint. Port
59+
numbers must be unique within a device and endpoint numbers must be unique
60+
within a port. If a device object may only has a single port, then the number
61+
of that port shall be zero. Similarly, if a port may only have a single
62+
endpoint, the number of that endpoint shall be zero.
5563

5664
The endpoint reference uses property extension with "remote-endpoint" property
5765
name followed by a reference in the same package. Such references consist of the
58-
the remote device reference, number of the port in the device and finally the
59-
number of the endpoint in that port. Individual references thus appear as:
66+
the remote device reference, the first package entry of the port data extension
67+
reference under the device and finally the first package entry of the endpoint
68+
data extension reference under the port. Individual references thus appear as:
6069

61-
Package() { device, port_number, endpoint_number }
70+
Package() { device, "port@X", "endpoint@Y" }
71+
72+
In the above example, "X" is the number of the port and "Y" is the number of the
73+
endpoint.
6274

6375
The references to endpoints must be always done both ways, to the
6476
remote endpoint and back from the referred remote endpoint node.
@@ -76,24 +88,24 @@ A simple example of this is show below:
7688
},
7789
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
7890
Package () {
79-
Package () { "port0", "PRT0" },
91+
Package () { "port@0", PRT0 },
8092
}
8193
})
8294
Name (PRT0, Package() {
8395
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
8496
Package () {
85-
Package () { "port", 0 },
97+
Package () { "reg", 0 },
8698
},
8799
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
88100
Package () {
89-
Package () { "endpoint0", "EP00" },
101+
Package () { "endpoint@0", EP00 },
90102
}
91103
})
92104
Name (EP00, Package() {
93105
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
94106
Package () {
95-
Package () { "endpoint", 0 },
96-
Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, 4, 0 } },
107+
Package () { "reg", 0 },
108+
Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } },
97109
}
98110
})
99111
}
@@ -106,26 +118,26 @@ A simple example of this is show below:
106118
Name (_DSD, Package () {
107119
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
108120
Package () {
109-
Package () { "port4", "PRT4" },
121+
Package () { "port@4", PRT4 },
110122
}
111123
})
112124

113125
Name (PRT4, Package() {
114126
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
115127
Package () {
116-
Package () { "port", 4 }, /* CSI-2 port number */
128+
Package () { "reg", 4 }, /* CSI-2 port number */
117129
},
118130
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
119131
Package () {
120-
Package () { "endpoint0", "EP40" },
132+
Package () { "endpoint@0", EP40 },
121133
}
122134
})
123135

124136
Name (EP40, Package() {
125137
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
126138
Package () {
127-
Package () { "endpoint", 0 },
128-
Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, 0, 0 } },
139+
Package () { "reg", 0 },
140+
Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } },
129141
}
130142
})
131143
}
@@ -151,7 +163,7 @@ References
151163
referenced 2016-10-04.
152164

153165
[5] Hierarchical Data Extension UUID For _DSD.
154-
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.pdf>,
166+
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
155167
referenced 2016-10-04.
156168

157169
[6] Advanced Configuration and Power Interface Specification.

‎MAINTAINERS‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ L: linux-acpi@vger.kernel.org
367367
S: Maintained
368368
F: drivers/acpi/arm64
369369

370+
ACPI I2C MULTI INSTANTIATE DRIVER
371+
M: Hans de Goede <hdegoede@redhat.com>
372+
L: platform-driver-x86@vger.kernel.org
373+
S: Maintained
374+
F: drivers/platform/x86/i2c-multi-instantiate.c
375+
370376
ACPI PMIC DRIVERS
371377
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
372378
M: Len Brown <lenb@kernel.org>

‎arch/arm64/mm/fault.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -727,12 +727,7 @@ static const struct fault_info fault_info[] = {
727727

728728
int handle_guest_sea(phys_addr_t addr, unsigned int esr)
729729
{
730-
int ret = -ENOENT;
731-
732-
if (IS_ENABLED(CONFIG_ACPI_APEI_SEA))
733-
ret = ghes_notify_sea();
734-
735-
return ret;
730+
return ghes_notify_sea();
736731
}
737732

738733
asmlinkage void __exception do_mem_abort(unsigned long addr, unsigned int esr,

‎drivers/acpi/acpica/aclocal.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ struct acpi_namespace_node {
165165
#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
166166
#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (install_method) */
167167

168-
#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */
169168
#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
170169
#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
171170
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */

‎drivers/acpi/acpica/nsaccess.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
613613
/* Special handling for the last segment (num_segments == 0) */
614614

615615
else {
616-
#ifdef ACPI_ASL_COMPILER
617-
if (!acpi_gbl_disasm_flag
618-
&& (this_node->flags & ANOBJ_IS_EXTERNAL)) {
619-
this_node->flags &= ~IMPLICIT_EXTERNAL;
620-
}
621-
#endif
622-
623616
/*
624617
* Sanity typecheck of the target object:
625618
*

‎drivers/acpi/acpica/nssearch.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ acpi_ns_search_and_enter(u32 target_name,
381381
if (flags & ACPI_NS_EXTERNAL ||
382382
(walk_state && walk_state->opcode == AML_SCOPE_OP)) {
383383
new_node->flags |= ANOBJ_IS_EXTERNAL;
384-
new_node->flags |= IMPLICIT_EXTERNAL;
385384
}
386385
#endif
387386

0 commit comments

Comments
 (0)