Commit ac73ce39 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'pm-cpuidle', 'pm-core', 'pm-sleep' and 'powercap'

Merge cpuidle changes, PM core changes and power capping changes for
6.1-rc1:

 - Add AlderLake-N support to intel_idle (Zhang Rui).

 - Replace strlcpy() with unused retval with strscpy() in intel_idle
   (Wolfram Sang).

 - Remove redundant check from cpuidle_switch_governor() (Yu Liao).

 - Replace strlcpy() with unused retval with strscpy() in the powernv
   cpuidle driver (Wolfram Sang).

 - Drop duplicate word from a comment in the coupled cpuidle driver
   (Jason Wang).

 - Make rpm_resume() return -EINPROGRESS if RPM_NOWAIT is passed to it
   in the flags and the device is about to resume (Rafael Wysocki).

 - Add extra debugging statement for multiple active IRQs to system
   wakeup handling code (Mario Limonciello).

 - Replace strlcpy() with unused retval with strscpy() in the core
   system suspend support code (Wolfram Sang).

 - Update the intel_rapl power capping driver:
   * Use standard Energy Unit for SPR Dram RAPL domain (Zhang Rui).
   * Add support for RAPTORLAKE_S (Zhang Rui).
   * Fix UBSAN shift-out-of-bounds issue (Chao Qin).

* pm-cpuidle:
  intel_idle: Add AlderLake-N support
  cpuidle: Remove redundant check in cpuidle_switch_governor()
  intel_idle: move from strlcpy() with unused retval to strscpy()
  cpuidle: powernv: move from strlcpy() with unused retval to strscpy()
  cpuidle: coupled: Drop duplicate word from a comment

* pm-core:
  PM: runtime: Return -EINPROGRESS from rpm_resume() in the RPM_NOWAIT case

* pm-sleep:
  PM: wakeup: Add extra debugging statement for multiple active IRQs
  PM: suspend: move from strlcpy() with unused retval to strscpy()

* powercap:
  powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain
  powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
  powercap: intel_rapl: Add support for RAPTORLAKE_S
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -792,10 +792,13 @@ static int rpm_resume(struct device *dev, int rpmflags)
		DEFINE_WAIT(wait);

		if (rpmflags & (RPM_ASYNC | RPM_NOWAIT)) {
			if (dev->power.runtime_status == RPM_SUSPENDING)
			if (dev->power.runtime_status == RPM_SUSPENDING) {
				dev->power.deferred_resume = true;
			else
				if (rpmflags & RPM_NOWAIT)
					retval = -EINPROGRESS;
			} else {
				retval = -EINPROGRESS;
			}
			goto out;
		}

+2 −0
Original line number Diff line number Diff line
@@ -944,6 +944,8 @@ void pm_system_irq_wakeup(unsigned int irq_number)
	else
		irq_number = 0;

	pm_pr_dbg("Triggering wakeup from IRQ %d\n", irq_number);

	raw_spin_unlock_irqrestore(&wakeup_irq_lock, flags);

	if (irq_number)
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
 * variable is not locked.  It is only written from the cpu that
 * it stores (or by the on/offlining cpu if that cpu is offline),
 * and only read after all the cpus are ready for the coupled idle
 * state are are no longer updating it.
 * state are no longer updating it.
 *
 * Three atomic counters are used.  alive_count tracks the number
 * of cpus in the coupled set that are currently or soon will be
+2 −2
Original line number Diff line number Diff line
@@ -233,8 +233,8 @@ static inline void add_powernv_state(int index, const char *name,
				     unsigned int exit_latency,
				     u64 psscr_val, u64 psscr_mask)
{
	strlcpy(powernv_states[index].name, name, CPUIDLE_NAME_LEN);
	strlcpy(powernv_states[index].desc, name, CPUIDLE_NAME_LEN);
	strscpy(powernv_states[index].name, name, CPUIDLE_NAME_LEN);
	strscpy(powernv_states[index].desc, name, CPUIDLE_NAME_LEN);
	powernv_states[index].flags = flags;
	powernv_states[index].target_residency = target_residency;
	powernv_states[index].exit_latency = exit_latency;
+5 −6
Original line number Diff line number Diff line
@@ -63,12 +63,11 @@ int cpuidle_switch_governor(struct cpuidle_governor *gov)

	cpuidle_curr_governor = gov;

	if (gov) {
	list_for_each_entry(dev, &cpuidle_detected_devices, device_list)
		cpuidle_enable_device(dev);

	cpuidle_install_idle_handler();
		printk(KERN_INFO "cpuidle: using governor %s\n", gov->name);
	}
	pr_info("cpuidle: using governor %s\n", gov->name);

	return 0;
}
Loading