Skip to content

Commit db5781c

Browse files
committed
Merge tag 'pm-7.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki: "These fix two intel_pstate driver issues causing it to crash on sysfs attribute accesses when some CPUs in the system are offline, finalize changes related to turning pm_runtime_put() into a void function, and update Daniel Lezcano's contact information: - Fix two issues in the intel_pstate driver causing it to crash when its sysfs interface is used on a system with some offline CPUs (David Arcari, Srinivas Pandruvada) - Update the last user of the pm_runtime_put() return value to discard it and turn pm_runtime_put() into a void function (Rafael Wysocki) - Update Daniel Lezcano's contact information in MAINTAINERS and .mailmap (Daniel Lezcano)" * tag 'pm-7.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: MAINTAINERS: Update contact with the kernel.org address cpufreq: intel_pstate: Fix crash during turbo disable cpufreq: intel_pstate: Fix NULL pointer dereference in update_cpu_qos_request() PM: runtime: Change pm_runtime_put() return type to void pmdomain: imx: gpcv2: Discard pm_runtime_put() return value
2 parents c45be7c + b78030d commit db5781c

5 files changed

Lines changed: 23 additions & 27 deletions

File tree

.mailmap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ Daniel Borkmann <daniel@iogearbox.net> <daniel.borkmann@tik.ee.ethz.ch>
210210
Daniel Borkmann <daniel@iogearbox.net> <dborkmann@redhat.com>
211211
Daniel Borkmann <daniel@iogearbox.net> <dborkman@redhat.com>
212212
Daniel Borkmann <daniel@iogearbox.net> <dxchgb@gmail.com>
213+
Daniel Lezcano <daniel.lezcano@kernel.org> <daniel.lezcano@linaro.org>
214+
Daniel Lezcano <daniel.lezcano@kernel.org> <daniel.lezcano@free.fr>
215+
Daniel Lezcano <daniel.lezcano@kernel.org> <daniel.lezcano@linexp.org>
216+
Daniel Lezcano <daniel.lezcano@kernel.org> <dlezcano@fr.ibm.com>
213217
Daniel Thompson <danielt@kernel.org> <daniel.thompson@linaro.org>
214218
Danilo Krummrich <dakr@kernel.org> <dakr@redhat.com>
215219
David Brownell <david-b@pacbell.net>

MAINTAINERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6278,7 +6278,7 @@ S: Maintained
62786278
F: include/linux/clk.h
62796279

62806280
CLOCKSOURCE, CLOCKEVENT DRIVERS
6281-
M: Daniel Lezcano <daniel.lezcano@linaro.org>
6281+
M: Daniel Lezcano <daniel.lezcano@kernel.org>
62826282
M: Thomas Gleixner <tglx@kernel.org>
62836283
L: linux-kernel@vger.kernel.org
62846284
S: Supported
@@ -6667,7 +6667,7 @@ F: rust/kernel/cpu.rs
66676667

66686668
CPU IDLE TIME MANAGEMENT FRAMEWORK
66696669
M: "Rafael J. Wysocki" <rafael@kernel.org>
6670-
M: Daniel Lezcano <daniel.lezcano@linaro.org>
6670+
M: Daniel Lezcano <daniel.lezcano@kernel.org>
66716671
R: Christian Loehle <christian.loehle@arm.com>
66726672
L: linux-pm@vger.kernel.org
66736673
S: Maintained
@@ -6697,15 +6697,15 @@ F: arch/x86/kernel/msr.c
66976697

66986698
CPUIDLE DRIVER - ARM BIG LITTLE
66996699
M: Lorenzo Pieralisi <lpieralisi@kernel.org>
6700-
M: Daniel Lezcano <daniel.lezcano@linaro.org>
6700+
M: Daniel Lezcano <daniel.lezcano@kernel.org>
67016701
L: linux-pm@vger.kernel.org
67026702
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
67036703
S: Maintained
67046704
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
67056705
F: drivers/cpuidle/cpuidle-big_little.c
67066706

67076707
CPUIDLE DRIVER - ARM EXYNOS
6708-
M: Daniel Lezcano <daniel.lezcano@linaro.org>
6708+
M: Daniel Lezcano <daniel.lezcano@kernel.org>
67096709
M: Kukjin Kim <kgene@kernel.org>
67106710
R: Krzysztof Kozlowski <krzk@kernel.org>
67116711
L: linux-pm@vger.kernel.org
@@ -26215,7 +26215,7 @@ F: drivers/media/radio/radio-raremono.c
2621526215

2621626216
THERMAL
2621726217
M: Rafael J. Wysocki <rafael@kernel.org>
26218-
M: Daniel Lezcano <daniel.lezcano@linaro.org>
26218+
M: Daniel Lezcano <daniel.lezcano@kernel.org>
2621926219
R: Zhang Rui <rui.zhang@intel.com>
2622026220
R: Lukasz Luba <lukasz.luba@arm.com>
2622126221
L: linux-pm@vger.kernel.org
@@ -26245,7 +26245,7 @@ F: drivers/thermal/amlogic_thermal.c
2624526245

2624626246
THERMAL/CPU_COOLING
2624726247
M: Amit Daniel Kachhap <amit.kachhap@gmail.com>
26248-
M: Daniel Lezcano <daniel.lezcano@linaro.org>
26248+
M: Daniel Lezcano <daniel.lezcano@kernel.org>
2624926249
M: Viresh Kumar <viresh.kumar@linaro.org>
2625026250
R: Lukasz Luba <lukasz.luba@arm.com>
2625126251
L: linux-pm@vger.kernel.org

drivers/cpufreq/intel_pstate.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,13 +1476,13 @@ static void __intel_pstate_update_max_freq(struct cpufreq_policy *policy,
14761476
refresh_frequency_limits(policy);
14771477
}
14781478

1479-
static bool intel_pstate_update_max_freq(struct cpudata *cpudata)
1479+
static bool intel_pstate_update_max_freq(int cpu)
14801480
{
1481-
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpudata->cpu);
1481+
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);
14821482
if (!policy)
14831483
return false;
14841484

1485-
__intel_pstate_update_max_freq(policy, cpudata);
1485+
__intel_pstate_update_max_freq(policy, all_cpu_data[cpu]);
14861486

14871487
return true;
14881488
}
@@ -1501,7 +1501,7 @@ static void intel_pstate_update_limits_for_all(void)
15011501
int cpu;
15021502

15031503
for_each_possible_cpu(cpu)
1504-
intel_pstate_update_max_freq(all_cpu_data[cpu]);
1504+
intel_pstate_update_max_freq(cpu);
15051505

15061506
mutex_lock(&hybrid_capacity_lock);
15071507

@@ -1647,8 +1647,8 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
16471647
static void update_cpu_qos_request(int cpu, enum freq_qos_req_type type)
16481648
{
16491649
struct cpudata *cpudata = all_cpu_data[cpu];
1650-
unsigned int freq = cpudata->pstate.turbo_freq;
16511650
struct freq_qos_request *req;
1651+
unsigned int freq;
16521652

16531653
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);
16541654
if (!policy)
@@ -1661,6 +1661,8 @@ static void update_cpu_qos_request(int cpu, enum freq_qos_req_type type)
16611661
if (hwp_active)
16621662
intel_pstate_get_hwp_cap(cpudata);
16631663

1664+
freq = cpudata->pstate.turbo_freq;
1665+
16641666
if (type == FREQ_QOS_MIN) {
16651667
freq = DIV_ROUND_UP(freq * global.min_perf_pct, 100);
16661668
} else {
@@ -1908,7 +1910,7 @@ static void intel_pstate_notify_work(struct work_struct *work)
19081910
struct cpudata *cpudata =
19091911
container_of(to_delayed_work(work), struct cpudata, hwp_notify_work);
19101912

1911-
if (intel_pstate_update_max_freq(cpudata)) {
1913+
if (intel_pstate_update_max_freq(cpudata->cpu)) {
19121914
/*
19131915
* The driver will not be unregistered while this function is
19141916
* running, so update the capacity without acquiring the driver

drivers/pmdomain/imx/gpcv2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,9 @@ static int imx_pgc_domain_suspend(struct device *dev)
14161416

14171417
static int imx_pgc_domain_resume(struct device *dev)
14181418
{
1419-
return pm_runtime_put(dev);
1419+
pm_runtime_put(dev);
1420+
1421+
return 0;
14201422
}
14211423
#endif
14221424

include/linux/pm_runtime.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -545,22 +545,10 @@ static inline int pm_runtime_resume_and_get(struct device *dev)
545545
*
546546
* Decrement the runtime PM usage counter of @dev and if it turns out to be
547547
* equal to 0, queue up a work item for @dev like in pm_request_idle().
548-
*
549-
* Return:
550-
* * 1: Success. Usage counter dropped to zero, but device was already suspended.
551-
* * 0: Success.
552-
* * -EINVAL: Runtime PM error.
553-
* * -EACCES: Runtime PM disabled.
554-
* * -EAGAIN: Runtime PM usage counter became non-zero or Runtime PM status
555-
* change ongoing.
556-
* * -EBUSY: Runtime PM child_count non-zero.
557-
* * -EPERM: Device PM QoS resume latency 0.
558-
* * -EINPROGRESS: Suspend already in progress.
559-
* * -ENOSYS: CONFIG_PM not enabled.
560548
*/
561-
static inline int pm_runtime_put(struct device *dev)
549+
static inline void pm_runtime_put(struct device *dev)
562550
{
563-
return __pm_runtime_idle(dev, RPM_GET_PUT | RPM_ASYNC);
551+
__pm_runtime_idle(dev, RPM_GET_PUT | RPM_ASYNC);
564552
}
565553

566554
/**

0 commit comments

Comments
 (0)