From: Greg Kroah-Hartman Date: Tue, 22 Apr 2025 07:25:12 +0000 (+0200) Subject: 6.14-stable patches X-Git-Tag: v6.1.135~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f68fb5deaacae2fc8a43f1e79ef27e735b2e05e;p=thirdparty%2Fkernel%2Fstable-queue.git 6.14-stable patches added patches: cpufreq-reference-count-policy-in-cpufreq_update_limits.patch scripts-generate_rust_analyzer-add-ffi-crate.patch --- diff --git a/queue-6.14/cpufreq-reference-count-policy-in-cpufreq_update_limits.patch b/queue-6.14/cpufreq-reference-count-policy-in-cpufreq_update_limits.patch new file mode 100644 index 0000000000..01f693bf59 --- /dev/null +++ b/queue-6.14/cpufreq-reference-count-policy-in-cpufreq_update_limits.patch @@ -0,0 +1,56 @@ +From 9e4e249018d208678888bdf22f6b652728106528 Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" +Date: Fri, 28 Mar 2025 21:39:08 +0100 +Subject: cpufreq: Reference count policy in cpufreq_update_limits() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Rafael J. Wysocki + +commit 9e4e249018d208678888bdf22f6b652728106528 upstream. + +Since acpi_processor_notify() can be called before registering a cpufreq +driver or even in cases when a cpufreq driver is not registered at all, +cpufreq_update_limits() needs to check if a cpufreq driver is present +and prevent it from being unregistered. + +For this purpose, make it call cpufreq_cpu_get() to obtain a cpufreq +policy pointer for the given CPU and reference count the corresponding +policy object, if present. + +Fixes: 5a25e3f7cc53 ("cpufreq: intel_pstate: Driver-specific handling of _PPC updates") +Closes: https://lore.kernel.org/linux-acpi/Z-ShAR59cTow0KcR@mail-itl +Reported-by: Marek Marczykowski-Górecki +Cc: All applicable +Signed-off-by: Rafael J. Wysocki +Acked-by: Viresh Kumar +Link: https://patch.msgid.link/1928789.tdWV9SEqCh@rjwysocki.net +[do not use __free(cpufreq_cpu_put) in a backport] +Signed-off-by: Marek Marczykowski-Górecki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/cpufreq/cpufreq.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/cpufreq/cpufreq.c ++++ b/drivers/cpufreq/cpufreq.c +@@ -2780,10 +2780,18 @@ EXPORT_SYMBOL(cpufreq_update_policy); + */ + void cpufreq_update_limits(unsigned int cpu) + { ++ struct cpufreq_policy *policy; ++ ++ policy = cpufreq_cpu_get(cpu); ++ if (!policy) ++ return; ++ + if (cpufreq_driver->update_limits) + cpufreq_driver->update_limits(cpu); + else + cpufreq_update_policy(cpu); ++ ++ cpufreq_cpu_put(policy); + } + EXPORT_SYMBOL_GPL(cpufreq_update_limits); + diff --git a/queue-6.14/scripts-generate_rust_analyzer-add-ffi-crate.patch b/queue-6.14/scripts-generate_rust_analyzer-add-ffi-crate.patch new file mode 100644 index 0000000000..93fa88bc77 --- /dev/null +++ b/queue-6.14/scripts-generate_rust_analyzer-add-ffi-crate.patch @@ -0,0 +1,55 @@ +From 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 Mon Sep 17 00:00:00 2001 +From: Lukas Fischer +Date: Fri, 4 Apr 2025 14:51:51 +0200 +Subject: scripts: generate_rust_analyzer: Add ffi crate + +From: Lukas Fischer + +commit 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 upstream. + +Commit d072acda4862 ("rust: use custom FFI integer types") did not +update rust-analyzer to include the new crate. + +To enable rust-analyzer support for these custom ffi types, add the +`ffi` crate as a dependency to the `bindings`, `uapi` and `kernel` +crates, which all directly depend on it. + +Fixes: d072acda4862 ("rust: use custom FFI integer types") +Signed-off-by: Lukas Fischer +Reviewed-by: Tamir Duberstein +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20250404125150.85783-2-kernel@o1oo11oo.de +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + scripts/generate_rust_analyzer.py | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/scripts/generate_rust_analyzer.py ++++ b/scripts/generate_rust_analyzer.py +@@ -97,6 +97,12 @@ def generate_crates(srctree, objtree, sy + ["core", "compiler_builtins"], + ) + ++ append_crate( ++ "ffi", ++ srctree / "rust" / "ffi.rs", ++ ["core", "compiler_builtins"], ++ ) ++ + def append_crate_with_generated( + display_name, + deps, +@@ -116,9 +122,9 @@ def generate_crates(srctree, objtree, sy + "exclude_dirs": [], + } + +- append_crate_with_generated("bindings", ["core"]) +- append_crate_with_generated("uapi", ["core"]) +- append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"]) ++ append_crate_with_generated("bindings", ["core", "ffi"]) ++ append_crate_with_generated("uapi", ["core", "ffi"]) ++ append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"]) + + def is_root_crate(build_file, target): + try: diff --git a/queue-6.14/series b/queue-6.14/series index bef1ac87e8..3435b888d0 100644 --- a/queue-6.14/series +++ b/queue-6.14/series @@ -225,3 +225,5 @@ arm64-sysreg-add-register-fields-for-hfgitr2_el2.patch arm64-sysreg-add-register-fields-for-hfgrtr2_el2.patch arm64-sysreg-add-register-fields-for-hfgwtr2_el2.patch arm64-boot-enable-el2-requirements-for-feat_pmuv3p9.patch +cpufreq-reference-count-policy-in-cpufreq_update_limits.patch +scripts-generate_rust_analyzer-add-ffi-crate.patch