]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jul 2024 09:19:18 +0000 (11:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jul 2024 09:19:18 +0000 (11:19 +0200)
added patches:
pwm-stm32-refuse-too-small-period-requests.patch
revert-cpufreq-amd-pstate-fix-the-inconsistency-in-max-frequency-units.patch

queue-6.6/pwm-stm32-refuse-too-small-period-requests.patch [new file with mode: 0644]
queue-6.6/revert-cpufreq-amd-pstate-fix-the-inconsistency-in-max-frequency-units.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/pwm-stm32-refuse-too-small-period-requests.patch b/queue-6.6/pwm-stm32-refuse-too-small-period-requests.patch
new file mode 100644 (file)
index 0000000..be2a266
--- /dev/null
@@ -0,0 +1,42 @@
+From c45fcf46ca2368dafe7e5c513a711a6f0f974308 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@baylibre.com>
+Date: Fri, 21 Jun 2024 16:37:12 +0200
+Subject: pwm: stm32: Refuse too small period requests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
+
+commit c45fcf46ca2368dafe7e5c513a711a6f0f974308 upstream.
+
+If period_ns is small, prd might well become 0. Catch that case because
+otherwise with
+
+       regmap_write(priv->regmap, TIM_ARR, prd - 1);
+
+a few lines down quite a big period is configured.
+
+Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
+Cc: stable@vger.kernel.org
+Reviewed-by: Trevor Gamblin <tgamblin@baylibre.com>
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
+Link: https://lore.kernel.org/r/b86f62f099983646f97eeb6bfc0117bb2d0c340d.1718979150.git.u.kleine-koenig@baylibre.com
+Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pwm/pwm-stm32.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/pwm/pwm-stm32.c
++++ b/drivers/pwm/pwm-stm32.c
+@@ -344,6 +344,9 @@ static int stm32_pwm_config(struct stm32
+       prd = div;
++      if (!prd)
++              return -EINVAL;
++
+       if (prescaler > MAX_TIM_PSC)
+               return -EINVAL;
diff --git a/queue-6.6/revert-cpufreq-amd-pstate-fix-the-inconsistency-in-max-frequency-units.patch b/queue-6.6/revert-cpufreq-amd-pstate-fix-the-inconsistency-in-max-frequency-units.patch
new file mode 100644 (file)
index 0000000..e66e853
--- /dev/null
@@ -0,0 +1,36 @@
+From 6704216d8f01cd05691ac9928f18e46fa1dfecf5 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Tue, 2 Jul 2024 11:14:23 +0200
+Subject: Revert "cpufreq: amd-pstate: Fix the inconsistency in max frequency units"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+This reverts commit 8f893e52b9e030a25ea62e31271bf930b01f2f07 which is
+commit e4731baaf29438508197d3a8a6d4f5a8c51663f8 upstream.
+
+It causes a regression in kernels older than 6.9.y, so drop it from
+here.
+
+Link: https://lore.kernel.org/r/18882bfe-4ca5-495c-ace5-b9bcab796ae5@amd.com
+Reported-by: Lars Wendler <wendler.lars@web.de>
+Cc: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
+Cc: Mario Limonciello <mario.limonciello@amd.com>
+Cc: Gautham R. Shenoy <gautham.shenoy@amd.com>
+Cc: Peter Jung <ptr1337@cachyos.org>
+Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/cpufreq/amd-pstate.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/cpufreq/amd-pstate.c
++++ b/drivers/cpufreq/amd-pstate.c
+@@ -675,7 +675,7 @@ static int amd_pstate_set_boost(struct c
+       if (state)
+               policy->cpuinfo.max_freq = cpudata->max_freq;
+       else
+-              policy->cpuinfo.max_freq = cpudata->nominal_freq * 1000;
++              policy->cpuinfo.max_freq = cpudata->nominal_freq;
+       policy->max = policy->cpuinfo.max_freq;
index f52777ebe154577ef2c379ecd0cf5d4b629df619..d2cc9b2fc672e7c657ea23fda9fdb76905421f5d 100644 (file)
@@ -148,3 +148,5 @@ ftruncate-pass-a-signed-offset.patch
 syscalls-fix-compat_sys_io_pgetevents_time64-usage.patch
 syscalls-fix-sys_fanotify_mark-prototype.patch
 erofs-fix-null-dereference-of-dif-bdev_handle-in-fscache-mode.patch
+pwm-stm32-refuse-too-small-period-requests.patch
+revert-cpufreq-amd-pstate-fix-the-inconsistency-in-max-frequency-units.patch