Skip to contentSkip to conversation

x86/HWP: adjust feature_hdc's section annotation

PATCH In review Jan Beulich 4 participants 5 messages Oct 9, 2025 – Oct 13, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/HWP: adjust feature_hdc's section annotation

The variable can be cleared (set to false) by a non-init function's error path (hwp_init_msrs()).

Fixes 99c4570f8209 ("cpufreq: Add Hardware P-State (HWP) driver")
xen/arch/x86/acpi/cpufreq/hwp.c +1 -1
@@ -21,7 +21,7 @@ static bool __ro_after_init hwp_in_use;
 static bool __ro_after_init feature_hwp_notification;
 static bool __ro_after_init feature_hwp_activity_window;
 
-static bool __ro_after_init feature_hdc;
+static bool __read_mostly feature_hdc;
 
 static bool __ro_after_init opt_cpufreq_hdc = true;
 
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jan Beulich

The variable can be cleared (set to false) by a non-init function's error path (hwp_init_msrs()).

Fixes 99c4570f8209 ("cpufreq: Add Hardware P-State (HWP) driver")

For 4.21, surely?

Quoted 13 lines
xen/arch/x86/acpi/cpufreq/hwp.c +1 -1
@@ -21,7 +21,7 @@ static bool __ro_after_init hwp_in_use;
 static bool __ro_after_init feature_hwp_notification;
 static bool __ro_after_init feature_hwp_activity_window;
 
-static bool __ro_after_init feature_hdc;
+static bool __read_mostly feature_hdc;
 
 static bool __ro_after_init opt_cpufreq_hdc = true;
 
#2 lore raw
Quoted 10 lines · Andrew Cooper
Quoted 5 lines · Jan Beulich

The variable can be cleared (set to false) by a non-init function's error path (hwp_init_msrs()).

Fixes 99c4570f8209 ("cpufreq: Add Hardware P-State (HWP) driver")

For 4.21, surely?

Definitely, forgot to tag it accordingly, but Cc-ed Oleksii be this reason.

Jan

Reviewed-by
#3 lore raw
Quoted 5 lines · Jan Beulich
Quoted 4 lines · Andrew Cooper
Quoted 3 lines · Jan Beulich

The variable can be cleared (set to false) by a non-init function's error path (hwp_init_msrs()).

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Fixes 99c4570f8209 ("cpufreq: Add Hardware P-State (HWP) driver")

For 4.21, surely?

Definitely, forgot to tag it accordingly, but Cc-ed Oleksii be this reason.

Thanks,
Jason

#4 lore raw
In reply to Jan Beulich
Quoted 5 lines · Jan Beulich

The variable can be cleared (set to false) by a non-init function's error path (hwp_init_msrs()).

Fixes 99c4570f8209 ("cpufreq: Add Hardware P-State (HWP) driver")

~ Oleksii

Quoted 12 lines
xen/arch/x86/acpi/cpufreq/hwp.c +1 -1
@@ -21,7 +21,7 @@ static bool __ro_after_init hwp_in_use;
  static bool __ro_after_init feature_hwp_notification;
  static bool __ro_after_init feature_hwp_activity_window;
 
-static bool __ro_after_init feature_hdc;
+static bool __read_mostly feature_hdc;
 
  static bool __ro_after_init opt_cpufreq_hdc = true;