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

Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-devfreq'

Merge cpuidle, cpufreq and devfreq updates for 6.8-rc1:

 - Add support for the Sierra Forest, Grand Ridge and Meteorlake SoCs to
   the intel_idle cpuidle driver (Artem Bityutskiy, Zhang Rui).

 - Do not enable interrupts when entering idle in the haltpoll cpuidle
   driver (Borislav Petkov).

 - Add Emerald Rapids support in no-HWP mode to the intel_pstate cpufreq
   driver (Zhenguo Yao).

 - Use EPP values programmed by the platform firmware as balance
   performance ones by default in intel_pstate (Srinivas Pandruvada).

 - Add a missing function return value check to the SCMI cpufreq driver
   to avoid unexpected behavior (Alexandra Diupina).

 - Fix parameter type warning in the armada-8k cpufreq driver (Gregory
   CLEMENT).

 - Rework trans_stat_show() in the devfreq core code to avoid buffer
   overflows (Christian Marangi).

 - Synchronize devfreq_monitor_[start/stop] so as to prevent a timer
   list corruption from occurring when devfreq governors are switched
   frequently (Mukesh Ojha).

* pm-cpuidle:
  cpuidle: haltpoll: Do not enable interrupts when entering idle
  intel_idle: add Sierra Forest SoC support
  intel_idle: add Grand Ridge SoC support
  intel_idle: Add Meteorlake support

* pm-cpufreq:
  cpufreq: intel_pstate: Add Emerald Rapids support in no-HWP mode
  cpufreq: armada-8k: Fix parameter type warning
  cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()
  cpufreq: intel_pstate: Prioritize firmware-provided balance performance EPP

* pm-devfreq:
  PM / devfreq: Synchronize devfreq_monitor_[start/stop]
  PM / devfreq: Convert to use sysfs_emit_at() API
  PM / devfreq: Fix buffer overflow in trans_stat_show
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ Description:

			echo 0 > /sys/class/devfreq/.../trans_stat

		If the transition table is bigger than PAGE_SIZE, reading
		this will return an -EFBIG error.

What:		/sys/class/devfreq/.../available_frequencies
Date:		October 2012
Contact:	Nishanth Menon <nm@ti.com>
+2 −2
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ static void __init armada_8k_get_sharing_cpus(struct clk *cur_clk,
			continue;
		}

		clk = clk_get(cpu_dev, 0);
		clk = clk_get(cpu_dev, NULL);
		if (IS_ERR(clk)) {
			pr_warn("Cannot get clock for CPU %d\n", cpu);
		} else {
@@ -165,7 +165,7 @@ static int __init armada_8k_cpufreq_init(void)
			continue;
		}

		clk = clk_get(cpu_dev, 0);
		clk = clk_get(cpu_dev, NULL);

		if (IS_ERR(clk)) {
			pr_err("Cannot get clock for CPU %d\n", cpu);
+8 −7
Original line number Diff line number Diff line
@@ -1691,13 +1691,6 @@ static void intel_pstate_update_epp_defaults(struct cpudata *cpudata)
{
	cpudata->epp_default = intel_pstate_get_epp(cpudata, 0);

	/*
	 * If this CPU gen doesn't call for change in balance_perf
	 * EPP return.
	 */
	if (epp_values[EPP_INDEX_BALANCE_PERFORMANCE] == HWP_EPP_BALANCE_PERFORMANCE)
		return;

	/*
	 * If the EPP is set by firmware, which means that firmware enabled HWP
	 * - Is equal or less than 0x80 (default balance_perf EPP)
@@ -1710,6 +1703,13 @@ static void intel_pstate_update_epp_defaults(struct cpudata *cpudata)
		return;
	}

	/*
	 * If this CPU gen doesn't call for change in balance_perf
	 * EPP return.
	 */
	if (epp_values[EPP_INDEX_BALANCE_PERFORMANCE] == HWP_EPP_BALANCE_PERFORMANCE)
		return;

	/*
	 * Use hard coded value per gen to update the balance_perf
	 * and default EPP.
@@ -2406,6 +2406,7 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
	X86_MATCH(ICELAKE_X,		core_funcs),
	X86_MATCH(TIGERLAKE,		core_funcs),
	X86_MATCH(SAPPHIRERAPIDS_X,	core_funcs),
	X86_MATCH(EMERALDRAPIDS_X,      core_funcs),
	{}
};
MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
+5 −2
Original line number Diff line number Diff line
@@ -334,8 +334,11 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev)

#ifdef CONFIG_COMMON_CLK
	/* dummy clock provider as needed by OPP if clocks property is used */
	if (of_property_present(dev->of_node, "#clock-cells"))
		devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
	if (of_property_present(dev->of_node, "#clock-cells")) {
		ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL);
		if (ret)
			return dev_err_probe(dev, ret, "%s: registering clock provider failed\n", __func__);
	}
#endif

	ret = cpufreq_register_driver(&scmi_cpufreq_driver);
+4 −5
Original line number Diff line number Diff line
@@ -25,13 +25,12 @@ MODULE_PARM_DESC(force, "Load unconditionally");
static struct cpuidle_device __percpu *haltpoll_cpuidle_devices;
static enum cpuhp_state haltpoll_hp_state;

static int default_enter_idle(struct cpuidle_device *dev,
static __cpuidle int default_enter_idle(struct cpuidle_device *dev,
					struct cpuidle_driver *drv, int index)
{
	if (current_clr_polling_and_test()) {
		local_irq_enable();
	if (current_clr_polling_and_test())
		return index;
	}

	arch_cpu_idle();
	return index;
}
Loading