]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 17:14:40 +0000 (19:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 17:14:40 +0000 (19:14 +0200)
added patches:
acpi-processor-perflib-fix-initial-_ppc-limit-application.patch
acpi-processor-perflib-move-problematic-pr-performance-check.patch
documentation-acpi-fix-parent-device-references.patch

queue-6.6/acpi-processor-perflib-fix-initial-_ppc-limit-application.patch [new file with mode: 0644]
queue-6.6/acpi-processor-perflib-move-problematic-pr-performance-check.patch [new file with mode: 0644]
queue-6.6/documentation-acpi-fix-parent-device-references.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/acpi-processor-perflib-fix-initial-_ppc-limit-application.patch b/queue-6.6/acpi-processor-perflib-fix-initial-_ppc-limit-application.patch
new file mode 100644 (file)
index 0000000..926b990
--- /dev/null
@@ -0,0 +1,80 @@
+From d33bd88ac0ebb49e7f7c8f29a8c7ee9eae85d765 Mon Sep 17 00:00:00 2001
+From: Jiayi Li <lijiayi@kylinos.cn>
+Date: Mon, 21 Jul 2025 11:26:06 +0800
+Subject: ACPI: processor: perflib: Fix initial _PPC limit application
+
+From: Jiayi Li <lijiayi@kylinos.cn>
+
+commit d33bd88ac0ebb49e7f7c8f29a8c7ee9eae85d765 upstream.
+
+If the BIOS sets a _PPC frequency limit upfront, it will fail to take
+effect due to a call ordering issue.  Namely, freq_qos_update_request()
+is called before freq_qos_add_request() for the given request causing
+the constraint update to be ignored.  The call sequence in question is
+as follows:
+
+cpufreq_policy_online()
+  acpi_cpufreq_cpu_init()
+    acpi_processor_register_performance()
+      acpi_processor_get_performance_info()
+        acpi_processor_get_platform_limit()
+         freq_qos_update_request(&perflib_req) <- inactive QoS request
+  blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
+                               CPUFREQ_CREATE_POLICY)
+    acpi_processor_notifier()
+      acpi_processor_ppc_init()
+        freq_qos_add_request(&perflib_req) <- QoS request activation
+
+Address this by adding an acpi_processor_get_platform_limit() call
+to acpi_processor_ppc_init(), after the perflib_req activation via
+freq_qos_add_request(), which causes the initial _PPC limit to be
+picked up as appropriate.  However, also ensure that the _PPC limit
+will not be picked up in the cases when the cpufreq driver does not
+call acpi_processor_register_performance() by adding a pr->performance
+check to the related_cpus loop in acpi_processor_ppc_init().
+
+Fixes: d15ce412737a ("ACPI: cpufreq: Switch to QoS requests instead of cpufreq notifier")
+Signed-off-by: Jiayi Li <lijiayi@kylinos.cn>
+Link: https://patch.msgid.link/20250721032606.3459369-1-lijiayi@kylinos.cn
+[ rjw: Consolidate pr-related checks in acpi_processor_ppc_init() ]
+[ rjw: Subject and changelog adjustments ]
+Cc: 5.4+ <stable@vger.kernel.org> # 5.4+: 2d8b39a62a5d ACPI: processor: Avoid NULL pointer dereferences at init time
+Cc: 5.4+ <stable@vger.kernel.org> # 5.4+: 3000ce3c52f8 cpufreq: Use per-policy frequency QoS
+Cc: 5.4+ <stable@vger.kernel.org> # 5.4+: a1bb46c36ce3 ACPI: processor: Add QoS requests for all CPUs
+Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/processor_perflib.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/processor_perflib.c
++++ b/drivers/acpi/processor_perflib.c
+@@ -174,11 +174,14 @@ void acpi_processor_ppc_init(struct cpuf
+ {
+       unsigned int cpu;
++      if (ignore_ppc == 1)
++              return;
++
+       for_each_cpu(cpu, policy->related_cpus) {
+               struct acpi_processor *pr = per_cpu(processors, cpu);
+               int ret;
+-              if (!pr)
++              if (!pr || !pr->performance)
+                       continue;
+               /*
+@@ -194,6 +197,11 @@ void acpi_processor_ppc_init(struct cpuf
+               if (ret < 0)
+                       pr_err("Failed to add freq constraint for CPU%d (%d)\n",
+                              cpu, ret);
++
++              ret = acpi_processor_get_platform_limit(pr);
++              if (ret)
++                      pr_err("Failed to update freq constraint for CPU%d (%d)\n",
++                             cpu, ret);
+       }
+ }
diff --git a/queue-6.6/acpi-processor-perflib-move-problematic-pr-performance-check.patch b/queue-6.6/acpi-processor-perflib-move-problematic-pr-performance-check.patch
new file mode 100644 (file)
index 0000000..b14bb09
--- /dev/null
@@ -0,0 +1,55 @@
+From d405ec23df13e6df599f5bd965a55d13420366b8 Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Tue, 12 Aug 2025 14:57:06 +0200
+Subject: ACPI: processor: perflib: Move problematic pr->performance check
+
+From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+
+commit d405ec23df13e6df599f5bd965a55d13420366b8 upstream.
+
+Commit d33bd88ac0eb ("ACPI: processor: perflib: Fix initial _PPC limit
+application") added a pr->performance check that prevents the frequency
+QoS request from being added when the given processor has no performance
+object.  Unfortunately, this causes a WARN() in freq_qos_remove_request()
+to trigger on an attempt to take the given CPU offline later because the
+frequency QoS object has not been added for it due to the missing
+performance object.
+
+Address this by moving the pr->performance check before calling
+acpi_processor_get_platform_limit() so it only prevents a limit from
+being set for the CPU if the performance object is not present.  This
+way, the frequency QoS request is added as it was before the above
+commit and it is present all the time along with the CPU's cpufreq
+policy regardless of whether or not the CPU is online.
+
+Fixes: d33bd88ac0eb ("ACPI: processor: perflib: Fix initial _PPC limit application")
+Tested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Link: https://patch.msgid.link/2801421.mvXUDI8C0e@rafael.j.wysocki
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/acpi/processor_perflib.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/acpi/processor_perflib.c
++++ b/drivers/acpi/processor_perflib.c
+@@ -181,7 +181,7 @@ void acpi_processor_ppc_init(struct cpuf
+               struct acpi_processor *pr = per_cpu(processors, cpu);
+               int ret;
+-              if (!pr || !pr->performance)
++              if (!pr)
+                       continue;
+               /*
+@@ -198,6 +198,9 @@ void acpi_processor_ppc_init(struct cpuf
+                       pr_err("Failed to add freq constraint for CPU%d (%d)\n",
+                              cpu, ret);
++              if (!pr->performance)
++                      continue;
++
+               ret = acpi_processor_get_platform_limit(pr);
+               if (ret)
+                       pr_err("Failed to update freq constraint for CPU%d (%d)\n",
diff --git a/queue-6.6/documentation-acpi-fix-parent-device-references.patch b/queue-6.6/documentation-acpi-fix-parent-device-references.patch
new file mode 100644 (file)
index 0000000..c31c997
--- /dev/null
@@ -0,0 +1,72 @@
+From e65cb011349e653ded541dddd6469c2ca813edcf Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Thu, 10 Jul 2025 20:00:23 +0300
+Subject: Documentation: ACPI: Fix parent device references
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit e65cb011349e653ded541dddd6469c2ca813edcf upstream.
+
+The _CRS resources in many cases want to have ResourceSource field
+to be a type of ACPI String. This means that to compile properly
+we need to enclosure the name path into double quotes. This will
+in practice defer the interpretation to a run-time stage, However,
+this may be interpreted differently on different OSes and ACPI
+interpreter implementations. In particular ACPICA might not correctly
+recognize the leading '^' (caret) character and will not resolve
+the relative name path properly. On top of that, this piece may be
+used in SSDTs which are loaded after the DSDT and on itself may also
+not resolve relative name paths outside of their own scopes.
+With this all said, fix documentation to use fully-qualified name
+paths always to avoid any misinterpretations, which is proven to
+work.
+
+Fixes: 8eb5c87a92c0 ("i2c: add ACPI support for I2C mux ports")
+Reported-by: Yevhen Kondrashyn <e.kondrashyn@gmail.com>
+Cc: All applicable <stable@vger.kernel.org>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Link: https://patch.msgid.link/20250710170225.961303-1-andriy.shevchenko@linux.intel.com
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/firmware-guide/acpi/i2c-muxes.rst |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/Documentation/firmware-guide/acpi/i2c-muxes.rst
++++ b/Documentation/firmware-guide/acpi/i2c-muxes.rst
+@@ -14,7 +14,7 @@ Consider this topology::
+     |      |   | 0x70 |--CH01--> i2c client B (0x50)
+     +------+   +------+
+-which corresponds to the following ASL::
++which corresponds to the following ASL (in the scope of \_SB)::
+     Device (SMB1)
+     {
+@@ -24,7 +24,7 @@ which corresponds to the following ASL::
+             Name (_HID, ...)
+             Name (_CRS, ResourceTemplate () {
+                 I2cSerialBus (0x70, ControllerInitiated, I2C_SPEED,
+-                            AddressingMode7Bit, "^SMB1", 0x00,
++                            AddressingMode7Bit, "\\_SB.SMB1", 0x00,
+                             ResourceConsumer,,)
+             }
+@@ -37,7 +37,7 @@ which corresponds to the following ASL::
+                     Name (_HID, ...)
+                     Name (_CRS, ResourceTemplate () {
+                         I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
+-                                    AddressingMode7Bit, "^CH00", 0x00,
++                                    AddressingMode7Bit, "\\_SB.SMB1.CH00", 0x00,
+                                     ResourceConsumer,,)
+                     }
+                 }
+@@ -52,7 +52,7 @@ which corresponds to the following ASL::
+                     Name (_HID, ...)
+                     Name (_CRS, ResourceTemplate () {
+                         I2cSerialBus (0x50, ControllerInitiated, I2C_SPEED,
+-                                    AddressingMode7Bit, "^CH01", 0x00,
++                                    AddressingMode7Bit, "\\_SB.SMB1.CH01", 0x00,
+                                     ResourceConsumer,,)
+                     }
+                 }
index 51228fcc7a62d3a0ac6eb93eff1c6133fed4e9c5..e3972226738802c1cd49575f7d19d0b5059e3797 100644 (file)
@@ -27,3 +27,6 @@ loongarch-bpf-fix-jump-offset-calculation-in-tailcall.patch
 sunvdc-balance-device-refcount-in-vdc_port_mpgroup_check.patch
 fs-prevent-file-descriptor-table-allocations-exceeding-int_max.patch
 eventpoll-fix-semi-unbounded-recursion.patch
+documentation-acpi-fix-parent-device-references.patch
+acpi-processor-perflib-fix-initial-_ppc-limit-application.patch
+acpi-processor-perflib-move-problematic-pr-performance-check.patch