]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 14:41:38 +0000 (16:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 14:41:38 +0000 (16:41 +0200)
added patches:
acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch
documentation-acpi-use-all-string-data-node-references.patch
pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch
pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch

queue-6.12/acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch [new file with mode: 0644]
queue-6.12/documentation-acpi-use-all-string-data-node-references.patch [new file with mode: 0644]
queue-6.12/pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch [new file with mode: 0644]
queue-6.12/pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch b/queue-6.12/acpi-cpufreq-fix-nominal_freq-units-to-khz-in-get_max_boost_ratio.patch
new file mode 100644 (file)
index 0000000..8ef70d6
--- /dev/null
@@ -0,0 +1,45 @@
+From cb6a85f38f456b086c366e346ebb67ffa70c7243 Mon Sep 17 00:00:00 2001
+From: "Gautham R. Shenoy" <gautham.shenoy@amd.com>
+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 <gautham.shenoy@amd.com>
+
+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 <chantr4@gmail.com>
+Closes: https://lore.kernel.org/lkml/aDaB63tDvbdcV0cg@HQ-GR2X1W2P57/
+Fixes: 083466754596 ("cpufreq: ACPI: Fix max-frequency computation")
+Signed-off-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
+Cc: 6.14+ <stable@vger.kernel.org> # 6.14+
+Link: https://patch.msgid.link/20250529085143.709-1-gautham.shenoy@amd.com
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -663,7 +663,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-6.12/documentation-acpi-use-all-string-data-node-references.patch b/queue-6.12/documentation-acpi-use-all-string-data-node-references.patch
new file mode 100644 (file)
index 0000000..6103397
--- /dev/null
@@ -0,0 +1,133 @@
+From 6db0261f3776bde01ae916ad8e1cb2ded3ba1a2b Mon Sep 17 00:00:00 2001
+From: Sakari Ailus <sakari.ailus@linux.intel.com>
+Date: Wed, 9 Apr 2025 11:47:38 +0300
+Subject: Documentation: ACPI: Use all-string data node references
+
+From: Sakari Ailus <sakari.ailus@linux.intel.com>
+
+commit 6db0261f3776bde01ae916ad8e1cb2ded3ba1a2b upstream.
+
+Document that references to data nodes shall use string-only references
+instead of a device reference and a succession of the first package
+entries of hierarchical data node references.
+
+Fixes: 9880702d123f ("ACPI: property: Support using strings in reference properties")
+Cc: 6.8+ <stable@vger.kernel.org> # 6.8+
+Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
+Link: https://patch.msgid.link/20250409084738.3657079-1-sakari.ailus@linux.intel.com
+[ rjw: Clarifying edits ]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/firmware-guide/acpi/dsd/data-node-references.rst |   26 ++++------
+ Documentation/firmware-guide/acpi/dsd/graph.rst                |   11 +---
+ Documentation/firmware-guide/acpi/dsd/leds.rst                 |    7 --
+ 3 files changed, 17 insertions(+), 27 deletions(-)
+
+--- a/Documentation/firmware-guide/acpi/dsd/data-node-references.rst
++++ b/Documentation/firmware-guide/acpi/dsd/data-node-references.rst
+@@ -12,11 +12,14 @@ ACPI in general allows referring to devi
+ Hierarchical data extension nodes may not be referred to directly, hence this
+ document defines a scheme to implement such references.
+-A reference consist of the device object name followed by one or more
+-hierarchical data extension [dsd-guide] keys. Specifically, the hierarchical
+-data extension node which is referred to by the key shall lie directly under
+-the parent object i.e. either the device object or another hierarchical data
+-extension node.
++A reference to a _DSD hierarchical data node is a string consisting of a
++device object reference followed by a dot (".") and a relative path to a data
++node object. Do not use non-string references as this will produce a copy of
++the hierarchical data node, not a reference!
++
++The hierarchical data extension node which is referred to shall be located
++directly under its parent object i.e. either the device object or another
++hierarchical data extension node [dsd-guide].
+ The keys in the hierarchical data nodes shall consist of the name of the node,
+ "@" character and the number of the node in hexadecimal notation (without pre-
+@@ -33,11 +36,9 @@ extension key.
+ Example
+ =======
+-In the ASL snippet below, the "reference" _DSD property contains a
+-device object reference to DEV0 and under that device object, a
+-hierarchical data extension key "node@1" referring to the NOD1 object
+-and lastly, a hierarchical data extension key "anothernode" referring to
+-the ANOD object which is also the final target node of the reference.
++In the ASL snippet below, the "reference" _DSD property contains a string
++reference to a hierarchical data extension node ANOD under DEV0 under the parent
++of DEV1. ANOD is also the final target node of the reference.
+ ::
+       Device (DEV0)
+@@ -76,10 +77,7 @@ the ANOD object which is also the final
+           Name (_DSD, Package () {
+               ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+               Package () {
+-                  Package () {
+-                      "reference", Package () {
+-                          ^DEV0, "node@1", "anothernode"
+-                      }
++                  Package () { "reference", "^DEV0.ANOD" }
+                   },
+               }
+           })
+--- a/Documentation/firmware-guide/acpi/dsd/graph.rst
++++ b/Documentation/firmware-guide/acpi/dsd/graph.rst
+@@ -66,12 +66,9 @@ of that port shall be zero. Similarly, i
+ endpoint, the number of that endpoint shall be zero.
+ The endpoint reference uses property extension with "remote-endpoint" property
+-name followed by a reference in the same package. Such references consist of
+-the remote device reference, the first package entry of the port data extension
+-reference under the device and finally the first package entry of the endpoint
+-data extension reference under the port. Individual references thus appear as::
++name followed by a string reference in the same package. [data-node-ref]::
+-    Package() { device, "port@X", "endpoint@Y" }
++    "device.datanode"
+ In the above example, "X" is the number of the port and "Y" is the number of
+ the endpoint.
+@@ -109,7 +106,7 @@ A simple example of this is show below::
+               ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+               Package () {
+                   Package () { "reg", 0 },
+-                  Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } },
++                  Package () { "remote-endpoint", "\\_SB.PCI0.ISP.EP40" },
+               }
+           })
+       }
+@@ -141,7 +138,7 @@ A simple example of this is show below::
+               ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+               Package () {
+                   Package () { "reg", 0 },
+-                  Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } },
++                  Package () { "remote-endpoint", "\\_SB.PCI0.I2C2.CAM0.EP00" },
+               }
+           })
+       }
+--- a/Documentation/firmware-guide/acpi/dsd/leds.rst
++++ b/Documentation/firmware-guide/acpi/dsd/leds.rst
+@@ -15,11 +15,6 @@ Referring to LEDs in Device tree is docu
+ "flash-leds" property documentation. In short, LEDs are directly referred to by
+ using phandles.
+-While Device tree allows referring to any node in the tree [devicetree], in
+-ACPI references are limited to device nodes only [acpi]. For this reason using
+-the same mechanism on ACPI is not possible. A mechanism to refer to non-device
+-ACPI nodes is documented in [data-node-ref].
+-
+ ACPI allows (as does DT) using integer arguments after the reference. A
+ combination of the LED driver device reference and an integer argument,
+ referring to the "reg" property of the relevant LED, is used to identify
+@@ -74,7 +69,7 @@ omitted. ::
+                       Package () {
+                               Package () {
+                                       "flash-leds",
+-                                      Package () { ^LED, "led@0", ^LED, "led@1" },
++                                      Package () { "^LED.LED0", "^LED.LED1" },
+                               }
+                       }
+               })
diff --git a/queue-6.12/pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch b/queue-6.12/pinctrl-armada-37xx-set-gpio-output-value-before-setting-direction.patch
new file mode 100644 (file)
index 0000000..4d4b64c
--- /dev/null
@@ -0,0 +1,62 @@
+From e6ebd4942981f8ad37189bbb36a3c8495e21ef4c Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <j4g8y7@gmail.com>
+Date: Wed, 14 May 2025 21:18:33 +0200
+Subject: pinctrl: armada-37xx: set GPIO output value before setting direction
+
+From: Gabor Juhos <j4g8y7@gmail.com>
+
+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 <kaloz@openwrt.org>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
+Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-2-07e9ac1ab737@gmail.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -417,23 +417,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(&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(&reg, &val_offset);
++      reg = OUTPUT_EN;
++      armada_37xx_update_reg(&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-6.12/pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch b/queue-6.12/pinctrl-armada-37xx-use-correct-output_val-register-for-gpios-31.patch
new file mode 100644 (file)
index 0000000..5821532
--- /dev/null
@@ -0,0 +1,48 @@
+From 947c93eb29c2a581c0b0b6d5f21af3c2b7ff6d25 Mon Sep 17 00:00:00 2001
+From: Gabor Juhos <j4g8y7@gmail.com>
+Date: Wed, 14 May 2025 21:18:32 +0200
+Subject: pinctrl: armada-37xx: use correct OUTPUT_VAL register for GPIOs > 31
+
+From: Gabor Juhos <j4g8y7@gmail.com>
+
+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 <kaloz@openwrt.org>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
+Link: https://lore.kernel.org/20250514-pinctrl-a37xx-fixes-v2-1-07e9ac1ab737@gmail.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -417,6 +417,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;
+@@ -429,6 +430,8 @@ static int armada_37xx_gpio_direction_ou
+               return ret;
+       reg = OUTPUT_VAL;
++      armada_37xx_update_reg(&reg, &val_offset);
++
+       val = value ? mask : 0;
+       regmap_update_bits(info->regmap, reg, mask, val);
index cd1f9720ec2e308b907e96c0656d88c96ba8cc50..9993067384062928a5b0efdf9d3a4d480323cc5f 100644 (file)
@@ -1,2 +1,6 @@
 tracing-fix-compilation-warning-on-arm32.patch
 f2fs-fix-to-avoid-accessing-uninitialized-curseg.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
+documentation-acpi-use-all-string-data-node-references.patch