Commit 0e9ba053 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Jia, Yingbao
Browse files

cpufreq: intel_pstate: Use __ro_after_init for three variables

mainline inclusion
from mainline-v6.10
commit e97a98238da68aea4a0be0b2cc40e39527c880b1
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/IB6QC4
CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e97a98238da68aea4a0be0b2cc40e39527c880b1



-------------------------------------------------

Intel-SIG: commit e97a98238da6 cpufreq: intel_pstate: Use __ro_after_init for three variables.
Backport intel_pstate driver update for 6.6 from 6.11

There are at least 3 variables in intel_pstate that do not get updated
after they have been initialized, so annotate them with __ro_after_init.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Yingbao Jia: amend commit log ]
Signed-off-by: default avatarYingbao Jia <yingbao.jia@intel.com>
parent b64abf5f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -293,10 +293,10 @@ struct pstate_funcs {
static struct pstate_funcs pstate_funcs __read_mostly;

static bool hwp_active __ro_after_init;
static int hwp_mode_bdw __read_mostly;
static bool per_cpu_limits __read_mostly;
static int hwp_mode_bdw __ro_after_init;
static bool per_cpu_limits __ro_after_init;
static bool hwp_forced __ro_after_init;
static bool hwp_boost __read_mostly;
static bool hwp_forced __read_mostly;

static struct cpufreq_driver *intel_pstate_driver __read_mostly;