From: Greg Kroah-Hartman Date: Wed, 4 Jun 2025 14:41:36 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v6.12.33~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbcb757ee950eb53497e2f22c1bd5f7c15ef80bb;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch --- diff --git a/queue-5.15/acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch b/queue-5.15/acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch new file mode 100644 index 0000000000..912996632d --- /dev/null +++ b/queue-5.15/acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch @@ -0,0 +1,45 @@ +From cb6a85f38f456b086c366e346ebb67ffa70c7243 Mon Sep 17 00:00:00 2001 +From: "Gautham R. Shenoy" +Date: Thu, 29 May 2025 14:21:43 +0530 +Subject: acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio() + +From: Gautham R. Shenoy + +commit cb6a85f38f456b086c366e346ebb67ffa70c7243 upstream. + +commit 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") +modified get_max_boost_ratio() to return the nominal_freq advertised +in the _CPC object. This was for the purposes of computing the maximum +frequency. The frequencies advertised in _CPC objects are in +MHz. However, cpufreq expects the frequency to be in KHz. Since the +nominal_freq returned by get_max_boost_ratio() was not in KHz but +instead in MHz,the cpuinfo_max_frequency that was computed using this +nominal_freq was incorrect and an invalid value which resulted in +cpufreq reporting the P0 frequency as the cpuinfo_max_freq. + +Fix this by converting the nominal_freq to KHz before returning the +same from get_max_boost_ratio(). + +Reported-by: Manu Bretelle +Closes: https://lore.kernel.org/lkml/aDaB63tDvbdcV0cg@HQ-GR2X1W2P57/ +Fixes: 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") +Signed-off-by: Gautham R. Shenoy +Cc: 6.14+ # 6.14+ +Link: https://patch.msgid.link/20250529085143.709-1-gautham.shenoy@amd.com +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/cpufreq/acpi-cpufreq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/cpufreq/acpi-cpufreq.c ++++ b/drivers/cpufreq/acpi-cpufreq.c +@@ -661,7 +661,7 @@ static u64 get_max_boost_ratio(unsigned + nominal_perf = perf_caps.nominal_perf; + + if (nominal_freq) +- *nominal_freq = perf_caps.nominal_freq; ++ *nominal_freq = perf_caps.nominal_freq * 1000; + + if (!highest_perf || !nominal_perf) { + pr_debug("CPU%d: highest or nominal performance missing\n", cpu); diff --git a/queue-5.15/pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch b/queue-5.15/pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch new file mode 100644 index 0000000000..e271b185db --- /dev/null +++ b/queue-5.15/pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch @@ -0,0 +1,62 @@ +From e6ebd4942981f8ad37189bbb36a3c8495e21ef4c Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Wed, 14 May 2025 21:18:33 +0200 +Subject: pinctrl: armada-37xx: set GPIO output value before setting direction + +From: Gabor Juhos + +commit e6ebd4942981f8ad37189bbb36a3c8495e21ef4c upstream. + +Changing the direction before updating the output value in the +OUTPUT_VAL register may result in a glitch on the output line +if the previous value in the OUTPUT_VAL register is different +from the one we want to set. + +In order to avoid that, update the output value before changing +the direction. + +Cc: stable@vger.kernel.org +Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior") +Signed-off-by: Imre Kaloz +Reviewed-by: Andrew Lunn +Signed-off-by: Gabor Juhos +Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-2-07e9ac1ab737@gmail.com +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +@@ -413,23 +413,22 @@ static int armada_37xx_gpio_direction_ou + unsigned int offset, int value) + { + struct armada_37xx_pinctrl *info = gpiochip_get_data(chip); +- unsigned int val_offset = offset; +- unsigned int reg = OUTPUT_EN; ++ unsigned int en_offset = offset; ++ unsigned int reg = OUTPUT_VAL; + unsigned int mask, val, ret; + + armada_37xx_update_reg(®, &offset); + mask = BIT(offset); ++ val = value ? mask : 0; + +- ret = regmap_update_bits(info->regmap, reg, mask, mask); +- ++ ret = regmap_update_bits(info->regmap, reg, mask, val); + if (ret) + return ret; + +- reg = OUTPUT_VAL; +- armada_37xx_update_reg(®, &val_offset); ++ reg = OUTPUT_EN; ++ armada_37xx_update_reg(®, &en_offset); + +- val = value ? mask : 0; +- regmap_update_bits(info->regmap, reg, mask, val); ++ regmap_update_bits(info->regmap, reg, mask, mask); + + return 0; + } diff --git a/queue-5.15/pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch b/queue-5.15/pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch new file mode 100644 index 0000000000..4afa4124f4 --- /dev/null +++ b/queue-5.15/pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch @@ -0,0 +1,48 @@ +From 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Wed, 14 May 2025 21:18:32 +0200 +Subject: pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31 + +From: Gabor Juhos + +commit 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 upstream. + +The controller has two consecutive OUTPUT_VAL registers and both +holds output value for 32 GPIOs. Due to a missing adjustment, the +current code always uses the first register while setting the +output value whereas it should use the second one for GPIOs > 31. + +Add the missing armada_37xx_update_reg() call to adjust the register +according to the 'offset' parameter of the function to fix the issue. + +Cc: stable@vger.kernel.org +Fixes: 6702abb3bf23 ("pinctrl: armada-37xx: Fix direction_output() callback behavior") +Signed-off-by: Imre Kaloz +Reviewed-by: Andrew Lunn +Signed-off-by: Gabor Juhos +Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-1-07e9ac1ab737@gmail.com +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c ++++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +@@ -413,6 +413,7 @@ static int armada_37xx_gpio_direction_ou + unsigned int offset, int value) + { + struct armada_37xx_pinctrl *info = gpiochip_get_data(chip); ++ unsigned int val_offset = offset; + unsigned int reg = OUTPUT_EN; + unsigned int mask, val, ret; + +@@ -425,6 +426,8 @@ static int armada_37xx_gpio_direction_ou + return ret; + + reg = OUTPUT_VAL; ++ armada_37xx_update_reg(®, &val_offset); ++ + val = value ? mask : 0; + regmap_update_bits(info->regmap, reg, mask, val); + diff --git a/queue-5.15/series b/queue-5.15/series index 6502ba340f..3bbd789eed 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -1 +1,4 @@ tracing-fix-compilation-warning-on-arm32.patch +pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch +pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch +acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch