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

Merge tag 'cpufreq-arm-fixes-6.15-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm

Merge ARM cpufreq fixes for 6.15-rc from Viresh Kumar:

"- Fix possible out-of-bound / null-ptr-deref in drivers (Andre Przywara
   and Henry Martin).

 - Fix Kconfig issues with compile-test (Johan Hovold and Krzysztof
   Kozlowski).

 - Fix invalid return value in .get() (Marc Zyngier).

 - Add SM8650 to cpufreq-dt-platdev blocklist (Pengyu Luo)."

* tag 'cpufreq-arm-fixes-6.15-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  cpufreq: fix compile-test defaults
  cpufreq: cppc: Fix invalid return value in .get() callback
  cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
  cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
  cpufreq: apple-soc: Fix null-ptr-deref in apple_soc_cpufreq_get_rate()
  cpufreq: Do not enable by default during compile testing
  cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist
  cpufreq: sun50i: prevent out-of-bounds access
parents 9d7a0577 a374f287
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ config ARM_VEXPRESS_SPC_CPUFREQ
config ARM_BRCMSTB_AVS_CPUFREQ
	tristate "Broadcom STB AVS CPUfreq driver"
	depends on (ARCH_BRCMSTB && !ARM_SCMI_CPUFREQ) || COMPILE_TEST
	default y
	default y if ARCH_BRCMSTB && !ARM_SCMI_CPUFREQ
	help
	  Some Broadcom STB SoCs use a co-processor running proprietary firmware
	  ("AVS") to handle voltage and frequency scaling. This driver provides
@@ -88,7 +88,7 @@ config ARM_HIGHBANK_CPUFREQ
	tristate "Calxeda Highbank-based"
	depends on ARCH_HIGHBANK || COMPILE_TEST
	depends on CPUFREQ_DT && REGULATOR && PL320_MBOX
	default m
	default m if ARCH_HIGHBANK
	help
	  This adds the CPUFreq driver for Calxeda Highbank SoC
	  based boards.
@@ -133,7 +133,7 @@ config ARM_MEDIATEK_CPUFREQ
config ARM_MEDIATEK_CPUFREQ_HW
	tristate "MediaTek CPUFreq HW driver"
	depends on ARCH_MEDIATEK || COMPILE_TEST
	default m
	default m if ARCH_MEDIATEK
	help
	  Support for the CPUFreq HW driver.
	  Some MediaTek chipsets have a HW engine to offload the steps
@@ -181,7 +181,7 @@ config ARM_RASPBERRYPI_CPUFREQ
config ARM_S3C64XX_CPUFREQ
	bool "Samsung S3C64XX"
	depends on CPU_S3C6410 || COMPILE_TEST
	default y
	default CPU_S3C6410
	help
	  This adds the CPUFreq driver for Samsung S3C6410 SoC.

@@ -190,7 +190,7 @@ config ARM_S3C64XX_CPUFREQ
config ARM_S5PV210_CPUFREQ
	bool "Samsung S5PV210 and S5PC110"
	depends on CPU_S5PV210 || COMPILE_TEST
	default y
	default CPU_S5PV210
	help
	  This adds the CPUFreq driver for Samsung S5PV210 and
	  S5PC110 SoCs.
@@ -214,7 +214,7 @@ config ARM_SCMI_CPUFREQ
config ARM_SPEAR_CPUFREQ
	bool "SPEAr CPUFreq support"
	depends on PLAT_SPEAR || COMPILE_TEST
	default y
	default PLAT_SPEAR
	help
	  This adds the CPUFreq driver support for SPEAr SOCs.

@@ -233,7 +233,7 @@ config ARM_TEGRA20_CPUFREQ
	tristate "Tegra20/30 CPUFreq support"
	depends on ARCH_TEGRA || COMPILE_TEST
	depends on CPUFREQ_DT
	default y
	default ARCH_TEGRA
	help
	  This adds the CPUFreq driver support for Tegra20/30 SOCs.

@@ -241,7 +241,7 @@ config ARM_TEGRA124_CPUFREQ
	bool "Tegra124 CPUFreq support"
	depends on ARCH_TEGRA || COMPILE_TEST
	depends on CPUFREQ_DT
	default y
	default ARCH_TEGRA
	help
	  This adds the CPUFreq driver support for Tegra124 SOCs.

@@ -256,14 +256,14 @@ config ARM_TEGRA194_CPUFREQ
	tristate "Tegra194 CPUFreq support"
	depends on ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC || (64BIT && COMPILE_TEST)
	depends on TEGRA_BPMP
	default y
	default ARCH_TEGRA_194_SOC || ARCH_TEGRA_234_SOC
	help
	  This adds CPU frequency driver support for Tegra194 SOCs.

config ARM_TI_CPUFREQ
	bool "Texas Instruments CPUFreq support"
	depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST
	default y
	default ARCH_OMAP2PLUS || ARCH_K3
	help
	  This driver enables valid OPPs on the running platform based on
	  values contained within the SoC in use. Enable this in order to
+8 −2
Original line number Diff line number Diff line
@@ -134,11 +134,17 @@ static const struct of_device_id apple_soc_cpufreq_of_match[] __maybe_unused = {

static unsigned int apple_soc_cpufreq_get_rate(unsigned int cpu)
{
	struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
	struct apple_cpu_priv *priv = policy->driver_data;
	struct cpufreq_policy *policy;
	struct apple_cpu_priv *priv;
	struct cpufreq_frequency_table *p;
	unsigned int pstate;

	policy = cpufreq_cpu_get_raw(cpu);
	if (unlikely(!policy))
		return 0;

	priv = policy->driver_data;

	if (priv->info->cur_pstate_mask) {
		u32 reg = readl_relaxed(priv->reg_base + APPLE_DVFS_STATUS);

+1 −1
Original line number Diff line number Diff line
@@ -747,7 +747,7 @@ static unsigned int cppc_cpufreq_get_rate(unsigned int cpu)
	int ret;

	if (!policy)
		return -ENODEV;
		return 0;

	cpu_data = policy->driver_data;

+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ static const struct of_device_id blocklist[] __initconst = {
	{ .compatible = "qcom,sm8350", },
	{ .compatible = "qcom,sm8450", },
	{ .compatible = "qcom,sm8550", },
	{ .compatible = "qcom,sm8650", },

	{ .compatible = "st,stih407", },
	{ .compatible = "st,stih410", },
+8 −2
Original line number Diff line number Diff line
@@ -37,11 +37,17 @@ static struct cpufreq_driver scmi_cpufreq_driver;

static unsigned int scmi_cpufreq_get_rate(unsigned int cpu)
{
	struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu);
	struct scmi_data *priv = policy->driver_data;
	struct cpufreq_policy *policy;
	struct scmi_data *priv;
	unsigned long rate;
	int ret;

	policy = cpufreq_cpu_get_raw(cpu);
	if (unlikely(!policy))
		return 0;

	priv = policy->driver_data;

	ret = perf_ops->freq_get(ph, priv->domain_id, &rate, false);
	if (ret)
		return 0;
Loading