Skip to content

Commit 1140481

Browse files
committed
Merge branches 'acpica', 'acpi-proc', 'acpi-processor' and 'acpi-pm'
Merge an ACPICA update, ACPI proc interface updates, ACPI processor driver updates, and ACPI power management updates for 6.17-rc1: - Printing the address in acpi_ex_trace_point() is either incorrect during early kernel boot or not really useful later when pathnames resolve properly, so stop doing it (Mario Limonciello) - Address several minor issues in the legacy ACPI proc interface (Andy Shevchenko) - Fix acpi_object union initialization in the ACPI processor driver to avoid using memory that contains leftover data (Sebastian Ott). - Make the ACPI processor perflib driver take the initial _PPC limit into account as appropriate (Jiayi Li). - Fix message formatting in the ACPI processor throttling driver (Colin Ian King). - Clean up general ACPI PM domain handling (Rafael Wysocki) * acpica: ACPICA: Decrease `AcpiExTracePoint` verbosity * acpi-proc: ACPI: proc: Prefer to use octal permission ACPI: proc: Use str_enabled_disabled() helper ACPI: proc: Remove unused header ACPI: proc: Use correct format specifier and drop casting ACPI: wakeup: Drop unneeded casting for sleep_state * acpi-processor: ACPI: processor: throttling: Remove space before newline ACPI: processor: perflib: Fix initial _PPC limit application ACPI: processor: fix acpi_object initialization * acpi-pm: ACPI: PM: Set .detach in acpi_general_pm_domain definition
5 parents 492086f + ef4af87 + acec3f6 + 94fd442 + 4a89166 commit 1140481

7 files changed

Lines changed: 25 additions & 18 deletions

File tree

drivers/acpi/acpi_processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static inline int acpi_processor_hotadd_init(struct acpi_processor *pr,
275275

276276
static int acpi_processor_get_info(struct acpi_device *device)
277277
{
278-
union acpi_object object = { 0 };
278+
union acpi_object object = { .processor = { 0 } };
279279
struct acpi_buffer buffer = { sizeof(union acpi_object), &object };
280280
struct acpi_processor *pr = acpi_driver_data(device);
281281
int device_declaration = 0;

drivers/acpi/acpica/extrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ acpi_ex_trace_point(acpi_trace_event_type type,
136136

137137
if (pathname) {
138138
ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
139-
"%s %s [0x%p:%s] execution.\n",
139+
"%s %s [%s] execution.\n",
140140
acpi_ex_get_trace_event_name(type),
141-
begin ? "Begin" : "End", aml, pathname));
141+
begin ? "Begin" : "End", pathname));
142142
} else {
143143
ACPI_DEBUG_PRINT((ACPI_DB_TRACE_POINT,
144144
"%s %s [0x%p] execution.\n",

drivers/acpi/device_pm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,8 @@ static int acpi_subsys_poweroff_noirq(struct device *dev)
13621362
}
13631363
#endif /* CONFIG_PM_SLEEP */
13641364

1365+
static void acpi_dev_pm_detach(struct device *dev, bool power_off);
1366+
13651367
static struct dev_pm_domain acpi_general_pm_domain = {
13661368
.ops = {
13671369
.runtime_suspend = acpi_subsys_runtime_suspend,
@@ -1382,6 +1384,7 @@ static struct dev_pm_domain acpi_general_pm_domain = {
13821384
.restore_early = acpi_subsys_restore_early,
13831385
#endif
13841386
},
1387+
.detach = acpi_dev_pm_detach,
13851388
};
13861389

13871390
/**
@@ -1465,7 +1468,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
14651468
acpi_device_wakeup_disable(adev);
14661469
}
14671470

1468-
dev->pm_domain->detach = acpi_dev_pm_detach;
14691471
return 1;
14701472
}
14711473
EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);

drivers/acpi/proc.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/proc_fs.h>
33
#include <linux/seq_file.h>
4-
#include <linux/export.h>
4+
#include <linux/string_choices.h>
55
#include <linux/suspend.h>
66
#include <linux/bcd.h>
77
#include <linux/acpi.h>
@@ -30,17 +30,16 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
3030
if (!dev->wakeup.flags.valid)
3131
continue;
3232

33-
seq_printf(seq, "%s\t S%d\t",
33+
seq_printf(seq, "%s\t S%llu\t",
3434
dev->pnp.bus_id,
35-
(u32) dev->wakeup.sleep_state);
35+
dev->wakeup.sleep_state);
3636

3737
mutex_lock(&dev->physical_node_lock);
3838

3939
if (!dev->physical_node_count) {
4040
seq_printf(seq, "%c%-8s\n",
4141
dev->wakeup.flags.valid ? '*' : ' ',
42-
device_may_wakeup(&dev->dev) ?
43-
"enabled" : "disabled");
42+
str_enabled_disabled(device_may_wakeup(&dev->dev)));
4443
} else {
4544
struct device *ldev;
4645
list_for_each_entry(entry, &dev->physical_node_list,
@@ -55,9 +54,8 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
5554

5655
seq_printf(seq, "%c%-8s %s:%s\n",
5756
dev->wakeup.flags.valid ? '*' : ' ',
58-
(device_may_wakeup(&dev->dev) ||
59-
device_may_wakeup(ldev)) ?
60-
"enabled" : "disabled",
57+
str_enabled_disabled(device_may_wakeup(ldev) ||
58+
device_may_wakeup(&dev->dev)),
6159
ldev->bus ? ldev->bus->name :
6260
"no-bus", dev_name(ldev));
6361
put_device(ldev);
@@ -141,6 +139,5 @@ static const struct proc_ops acpi_system_wakeup_device_proc_ops = {
141139
void __init acpi_sleep_proc_init(void)
142140
{
143141
/* 'wakeup device' [R/W] */
144-
proc_create("wakeup", S_IFREG | S_IRUGO | S_IWUSR,
145-
acpi_root_dir, &acpi_system_wakeup_device_proc_ops);
142+
proc_create("wakeup", 0644, acpi_root_dir, &acpi_system_wakeup_device_proc_ops);
146143
}

drivers/acpi/processor_perflib.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,14 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
173173
{
174174
unsigned int cpu;
175175

176+
if (ignore_ppc == 1)
177+
return;
178+
176179
for_each_cpu(cpu, policy->related_cpus) {
177180
struct acpi_processor *pr = per_cpu(processors, cpu);
178181
int ret;
179182

180-
if (!pr)
183+
if (!pr || !pr->performance)
181184
continue;
182185

183186
/*
@@ -193,6 +196,11 @@ void acpi_processor_ppc_init(struct cpufreq_policy *policy)
193196
if (ret < 0)
194197
pr_err("Failed to add freq constraint for CPU%d (%d)\n",
195198
cpu, ret);
199+
200+
ret = acpi_processor_get_platform_limit(pr);
201+
if (ret)
202+
pr_err("Failed to update freq constraint for CPU%d (%d)\n",
203+
cpu, ret);
196204
}
197205
}
198206

drivers/acpi/processor_throttling.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static int acpi_processor_throttling_notifier(unsigned long event, void *data)
235235
if (pr->throttling_platform_limit > target_state)
236236
target_state = pr->throttling_platform_limit;
237237
if (target_state >= p_throttling->state_count) {
238-
pr_warn("Exceed the limit of T-state \n");
238+
pr_warn("Exceed the limit of T-state\n");
239239
target_state = p_throttling->state_count - 1;
240240
}
241241
p_tstate->target_state = target_state;

drivers/acpi/wakeup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void acpi_enable_wakeup_devices(u8 sleep_state)
4242
list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list,
4343
wakeup_list) {
4444
if (!dev->wakeup.flags.valid
45-
|| sleep_state > (u32) dev->wakeup.sleep_state
45+
|| sleep_state > dev->wakeup.sleep_state
4646
|| !(device_may_wakeup(&dev->dev)
4747
|| dev->wakeup.prepare_count))
4848
continue;
@@ -67,7 +67,7 @@ void acpi_disable_wakeup_devices(u8 sleep_state)
6767
list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list,
6868
wakeup_list) {
6969
if (!dev->wakeup.flags.valid
70-
|| sleep_state > (u32) dev->wakeup.sleep_state
70+
|| sleep_state > dev->wakeup.sleep_state
7171
|| !(device_may_wakeup(&dev->dev)
7272
|| dev->wakeup.prepare_count))
7373
continue;

0 commit comments

Comments
 (0)