Skip to content

Commit 2baa85d

Browse files
committed
Merge tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI updates from Rafael Wysocki: "These eliminate significant AML processing overhead related to using operation regions in system memory, update the ACPICA code in the kernel to upstream revision 20200717 (including a fix to prevent operation region reference counts from overflowing in some cases), remove the last bits of the (long deprecated) ACPI procfs interface and do some assorted cleanups. Specifics: - Eliminate significant AML processing overhead related to using operation regions in system memory by reworking the management of memory mappings in the ACPI code to defer unmap operations (to do them outside of the ACPICA locks, among other things) and making the memory operation reagion handler avoid releasing memory mappings created by it too early (Rafael Wysocki). - Update the ACPICA code in the kernel to upstream revision 20200717: * Prevent operation region reference counts from overflowing in some cases (Erik Kaneda). * Replace one-element array with flexible-array (Gustavo A. R. Silva). - Fix ACPI PCI hotplug reference counting (Rafael Wysocki). - Drop last bits of the ACPI procfs interface (Thomas Renninger). - Drop some redundant checks from the code parsing ACPI tables related to NUMA (Hanjun Guo). - Avoid redundant object evaluation in the ACPI device properties handling code (Heikki Krogerus). - Avoid unecessary memory overhead related to storing the signatures of the ACPI tables recognized by the kernel (Ard Biesheuvel). - Add missing newline characters when printing module parameter values in some places (Xiongfeng Wang). - Update the link to the ACPI specifications in some places (Tiezhu Yang). - Use the fallthrough pseudo-keyword in the ACPI code (Gustavo A. R. Silva). - Drop redundant variable initialization from the APEI code (Colin Ian King). - Drop uninitialized_var() from the ACPI PAD driver (Jason Yan). - Replace HTTP links with HTTPS ones in the ACPI code (Alexander A. Klimov)" * tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits) ACPI: APEI: remove redundant assignment to variable rc ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check ACPI: NUMA: Remove the useless sub table pointer check ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array() ACPICA: Update version to 20200717 ACPICA: Do not increment operation_region reference counts for field units ACPICA: Replace one-element array with flexible-array ACPI: Replace HTTP links with HTTPS ones ACPI: Use valid link to the ACPI specification ACPI: OSL: Clean up the removal of unused memory mappings ACPI: OSL: Use deferred unmapping in acpi_os_unmap_iomem() ACPI: OSL: Use deferred unmapping in acpi_os_unmap_generic_address() ACPICA: Preserve memory opregion mappings ACPI: OSL: Implement deferred unmapping of ACPI memory ACPI: Use fallthrough pseudo-keyword PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() ACPI: tables: avoid relocations for table signature array ACPI: PAD: Eliminate usage of uninitialized_var() macro ACPI: sysfs: add newlines when printing module parameters ACPI: EC: add newline when printing 'ec_event_clearing' module parameter ...
2 parents 0408497 + db1da2f commit 2baa85d

38 files changed

+167
-620
lines changed

Documentation/firmware-guide/acpi/DSD-properties-rules.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,5 @@ contents.
9696
References
9797
==========
9898

99-
.. [1] http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
100-
.. [2] http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf
99+
.. [1] https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf
100+
.. [2] https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf

Documentation/firmware-guide/acpi/dsd/data-node-references.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ References
8585
==========
8686

8787
[1] Hierarchical Data Extension UUID For _DSD.
88-
<http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
88+
<https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
8989
referenced 2018-07-17.
9090

9191
[2] Device Properties UUID For _DSD.
92-
<http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
92+
<https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
9393
referenced 2016-10-04.

Documentation/firmware-guide/acpi/dsd/graph.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,23 +154,23 @@ References
154154
==========
155155

156156
[1] _DSD (Device Specific Data) Implementation Guide.
157-
http://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel-1_1.htm,
157+
https://www.uefi.org/sites/default/files/resources/_DSD-implementation-guide-toplevel-1_1.htm,
158158
referenced 2016-10-03.
159159

160-
[2] Devicetree. http://www.devicetree.org, referenced 2016-10-03.
160+
[2] Devicetree. https://www.devicetree.org, referenced 2016-10-03.
161161

162162
[3] Documentation/devicetree/bindings/graph.txt
163163

164164
[4] Device Properties UUID For _DSD.
165-
http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf,
165+
https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf,
166166
referenced 2016-10-04.
167167

168168
[5] Hierarchical Data Extension UUID For _DSD.
169-
http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf,
169+
https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf,
170170
referenced 2016-10-04.
171171

172172
[6] Advanced Configuration and Power Interface Specification.
173-
http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf,
173+
https://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf,
174174
referenced 2016-10-04.
175175

176176
[7] _DSD Device Properties Usage Rules.

Documentation/firmware-guide/acpi/dsd/leds.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ where
9090
References
9191
==========
9292

93-
[1] Device tree. <URL:http://www.devicetree.org>, referenced 2019-02-21.
93+
[1] Device tree. <URL:https://www.devicetree.org>, referenced 2019-02-21.
9494

9595
[2] Advanced Configuration and Power Interface Specification.
9696
<URL:https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf>,
@@ -101,11 +101,11 @@ References
101101
[4] Documentation/devicetree/bindings/media/video-interfaces.txt
102102

103103
[5] Device Properties UUID For _DSD.
104-
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
104+
<URL:https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf>,
105105
referenced 2019-02-21.
106106

107107
[6] Hierarchical Data Extension UUID For _DSD.
108-
<URL:http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
108+
<URL:https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf>,
109109
referenced 2019-02-21.
110110

111111
[7] Documentation/firmware-guide/acpi/dsd/data-node-references.rst

Documentation/firmware-guide/acpi/lpit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Low Power Idle Table (LPIT)
77
To enumerate platform Low Power Idle states, Intel platforms are using
88
“Low Power Idle Table” (LPIT). More details about this table can be
99
downloaded from:
10-
http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf
10+
https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf
1111

1212
Residencies for each low power state can be read via FFH
1313
(Function fixed hardware) or a memory mapped interface.

Documentation/hwmon/acpi_power_meter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Supported systems:
99

1010
Prefix: 'power_meter'
1111

12-
Datasheet: http://acpi.info/, section 10.4.
12+
Datasheet: https://uefi.org/specifications, section 10.4.
1313

1414
Author: Darrick J. Wong
1515

drivers/acpi/Kconfig

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ menuconfig ACPI
3232
Linux support for ACPI is based on Intel Corporation's ACPI
3333
Component Architecture (ACPI CA). For more information on the
3434
ACPI CA, see:
35-
<http://acpica.org/>
35+
<https://acpica.org/>
3636

3737
ACPI is an open industry specification originally co-developed by
3838
Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. Currently,
3939
it is developed by the ACPI Specification Working Group (ASWG) under
4040
the UEFI Forum and any UEFI member can join the ASWG and contribute
4141
to the ACPI specification.
4242
The specification is available at:
43-
<http://www.acpi.info>
44-
<http://www.uefi.org/acpi/specs>
43+
<https://uefi.org/specifications>
4544

4645
if ACPI
4746

@@ -99,23 +98,6 @@ config ACPI_SLEEP
9998
depends on ACPI_SYSTEM_POWER_STATES_SUPPORT
10099
default y
101100

102-
config ACPI_PROCFS_POWER
103-
bool "Deprecated power /proc/acpi directories"
104-
depends on X86 && PROC_FS
105-
help
106-
For backwards compatibility, this option allows
107-
deprecated power /proc/acpi/ directories to exist, even when
108-
they have been replaced by functions in /sys.
109-
The deprecated directories (and their replacements) include:
110-
/proc/acpi/battery/* (/sys/class/power_supply/*) and
111-
/proc/acpi/ac_adapter/* (sys/class/power_supply/*).
112-
This option has no effect on /proc/acpi/ directories
113-
and functions which do not yet exist in /sys.
114-
This option, together with the proc directories, will be
115-
deleted in the future.
116-
117-
Say N to delete power /proc/acpi/ directories that have moved to /sys.
118-
119101
config ACPI_REV_OVERRIDE_POSSIBLE
120102
bool "Allow supported ACPI revision to be overridden"
121103
depends on X86

drivers/acpi/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ acpi-$(CONFIG_X86) += acpi_cmos_rtc.o
5555
acpi-$(CONFIG_X86) += x86/apple.o
5656
acpi-$(CONFIG_X86) += x86/utils.o
5757
acpi-$(CONFIG_DEBUG_FS) += debugfs.o
58-
acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
5958
acpi-y += acpi_lpat.o
6059
acpi-$(CONFIG_ACPI_LPIT) += acpi_lpit.o
6160
acpi-$(CONFIG_ACPI_GENERIC_GSI) += irq.o

drivers/acpi/ac.c

Lines changed: 1 addition & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
#include <linux/types.h>
1414
#include <linux/dmi.h>
1515
#include <linux/delay.h>
16-
#ifdef CONFIG_ACPI_PROCFS_POWER
17-
#include <linux/proc_fs.h>
18-
#include <linux/seq_file.h>
19-
#endif
2016
#include <linux/platform_device.h>
2117
#include <linux/power_supply.h>
2218
#include <linux/acpi.h>
@@ -66,12 +62,6 @@ static int acpi_ac_resume(struct device *dev);
6662
#endif
6763
static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
6864

69-
#ifdef CONFIG_ACPI_PROCFS_POWER
70-
extern struct proc_dir_entry *acpi_lock_ac_dir(void);
71-
extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir);
72-
#endif
73-
74-
7565
static int ac_sleep_before_get_state_ms;
7666
static int ac_check_pmic = 1;
7767

@@ -150,77 +140,6 @@ static enum power_supply_property ac_props[] = {
150140
POWER_SUPPLY_PROP_ONLINE,
151141
};
152142

153-
#ifdef CONFIG_ACPI_PROCFS_POWER
154-
/* --------------------------------------------------------------------------
155-
FS Interface (/proc)
156-
-------------------------------------------------------------------------- */
157-
158-
static struct proc_dir_entry *acpi_ac_dir;
159-
160-
static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
161-
{
162-
struct acpi_ac *ac = seq->private;
163-
164-
165-
if (!ac)
166-
return 0;
167-
168-
if (acpi_ac_get_state(ac)) {
169-
seq_puts(seq, "ERROR: Unable to read AC Adapter state\n");
170-
return 0;
171-
}
172-
173-
seq_puts(seq, "state: ");
174-
switch (ac->state) {
175-
case ACPI_AC_STATUS_OFFLINE:
176-
seq_puts(seq, "off-line\n");
177-
break;
178-
case ACPI_AC_STATUS_ONLINE:
179-
seq_puts(seq, "on-line\n");
180-
break;
181-
default:
182-
seq_puts(seq, "unknown\n");
183-
break;
184-
}
185-
186-
return 0;
187-
}
188-
189-
static int acpi_ac_add_fs(struct acpi_ac *ac)
190-
{
191-
struct proc_dir_entry *entry = NULL;
192-
193-
printk(KERN_WARNING PREFIX "Deprecated procfs I/F for AC is loaded,"
194-
" please retry with CONFIG_ACPI_PROCFS_POWER cleared\n");
195-
if (!acpi_device_dir(ac->device)) {
196-
acpi_device_dir(ac->device) =
197-
proc_mkdir(acpi_device_bid(ac->device), acpi_ac_dir);
198-
if (!acpi_device_dir(ac->device))
199-
return -ENODEV;
200-
}
201-
202-
/* 'state' [R] */
203-
entry = proc_create_single_data(ACPI_AC_FILE_STATE, S_IRUGO,
204-
acpi_device_dir(ac->device), acpi_ac_seq_show, ac);
205-
if (!entry)
206-
return -ENODEV;
207-
return 0;
208-
}
209-
210-
static int acpi_ac_remove_fs(struct acpi_ac *ac)
211-
{
212-
213-
if (acpi_device_dir(ac->device)) {
214-
remove_proc_entry(ACPI_AC_FILE_STATE,
215-
acpi_device_dir(ac->device));
216-
remove_proc_entry(acpi_device_bid(ac->device), acpi_ac_dir);
217-
acpi_device_dir(ac->device) = NULL;
218-
}
219-
220-
return 0;
221-
}
222-
#endif
223-
224143
/* --------------------------------------------------------------------------
225144
Driver Model
226145
-------------------------------------------------------------------------- */
@@ -236,7 +155,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
236155
default:
237156
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
238157
"Unsupported event [0x%x]\n", event));
239-
/* fall through */
158+
fallthrough;
240159
case ACPI_AC_NOTIFY_STATUS:
241160
case ACPI_NOTIFY_BUS_CHECK:
242161
case ACPI_NOTIFY_DEVICE_CHECK:
@@ -348,11 +267,6 @@ static int acpi_ac_add(struct acpi_device *device)
348267
psy_cfg.drv_data = ac;
349268

350269
ac->charger_desc.name = acpi_device_bid(device);
351-
#ifdef CONFIG_ACPI_PROCFS_POWER
352-
result = acpi_ac_add_fs(ac);
353-
if (result)
354-
goto end;
355-
#endif
356270
ac->charger_desc.type = POWER_SUPPLY_TYPE_MAINS;
357271
ac->charger_desc.properties = ac_props;
358272
ac->charger_desc.num_properties = ARRAY_SIZE(ac_props);
@@ -372,9 +286,6 @@ static int acpi_ac_add(struct acpi_device *device)
372286
register_acpi_notifier(&ac->battery_nb);
373287
end:
374288
if (result) {
375-
#ifdef CONFIG_ACPI_PROCFS_POWER
376-
acpi_ac_remove_fs(ac);
377-
#endif
378289
kfree(ac);
379290
}
380291

@@ -418,10 +329,6 @@ static int acpi_ac_remove(struct acpi_device *device)
418329
power_supply_unregister(ac->charger);
419330
unregister_acpi_notifier(&ac->battery_nb);
420331

421-
#ifdef CONFIG_ACPI_PROCFS_POWER
422-
acpi_ac_remove_fs(ac);
423-
#endif
424-
425332
kfree(ac);
426333

427334
return 0;
@@ -447,18 +354,8 @@ static int __init acpi_ac_init(void)
447354
}
448355
}
449356

450-
#ifdef CONFIG_ACPI_PROCFS_POWER
451-
acpi_ac_dir = acpi_lock_ac_dir();
452-
if (!acpi_ac_dir)
453-
return -ENODEV;
454-
#endif
455-
456-
457357
result = acpi_bus_register_driver(&acpi_ac_driver);
458358
if (result < 0) {
459-
#ifdef CONFIG_ACPI_PROCFS_POWER
460-
acpi_unlock_ac_dir(acpi_ac_dir);
461-
#endif
462359
return -ENODEV;
463360
}
464361

@@ -468,9 +365,6 @@ static int __init acpi_ac_init(void)
468365
static void __exit acpi_ac_exit(void)
469366
{
470367
acpi_bus_unregister_driver(&acpi_ac_driver);
471-
#ifdef CONFIG_ACPI_PROCFS_POWER
472-
acpi_unlock_ac_dir(acpi_ac_dir);
473-
#endif
474368
}
475369
module_init(acpi_ac_init);
476370
module_exit(acpi_ac_exit);

drivers/acpi/acpi_pad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static void round_robin_cpu(unsigned int tsk_index)
8888
cpumask_var_t tmp;
8989
int cpu;
9090
unsigned long min_weight = -1;
91-
unsigned long uninitialized_var(preferred_cpu);
91+
unsigned long preferred_cpu;
9292

9393
if (!alloc_cpumask_var(&tmp, GFP_KERNEL))
9494
return;

0 commit comments

Comments
 (0)