cpufreq: intel_pstate: Use __ro_after_init for three variables
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 Mar 2024 19:34:06 +0000 (20:34 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 2 Apr 2024 10:56:43 +0000 (12:56 +0200)
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c

index fa707a207c8e5c6efb74eeeaa32fe4784a364d1c..a9e36bbea4faa8017adc2478585833ec199bab0a 100644 (file)
@@ -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;