[PATCH] x86/HWP: adjust feature_hdc's section annotation

Jan Beulich posted 1 patch 3 weeks ago
Failed in applying to current master (apply log)
[PATCH] x86/HWP: adjust feature_hdc's section annotation
Posted by Jan Beulich 3 weeks ago
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")
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/acpi/cpufreq/hwp.c
+++ b/xen/arch/x86/acpi/cpufreq/hwp.c
@@ -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;
Re: [PATCH] x86/HWP: adjust feature_hdc's section annotation
Posted by Oleksii Kurochko 2 weeks, 3 days ago
On 10/9/25 10:50 AM, Jan Beulich wrote:
> 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")
> Signed-off-by: Jan Beulich<jbeulich@suse.com>

Release-Acked-by: Oleksii Kurochko<oleksii.kurochko@gmail.com>

~ Oleksii

>
> --- a/xen/arch/x86/acpi/cpufreq/hwp.c
> +++ b/xen/arch/x86/acpi/cpufreq/hwp.c
> @@ -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;
>   
Re: [PATCH] x86/HWP: adjust feature_hdc's section annotation
Posted by Andrew Cooper 3 weeks ago
On 09/10/2025 9:50 am, Jan Beulich wrote:
> 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")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

For 4.21, surely?

>
> --- a/xen/arch/x86/acpi/cpufreq/hwp.c
> +++ b/xen/arch/x86/acpi/cpufreq/hwp.c
> @@ -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;
>  
>
Re: [PATCH for-4.21] x86/HWP: adjust feature_hdc's section annotation
Posted by Jan Beulich 3 weeks ago
On 09.10.2025 11:07, Andrew Cooper wrote:
> On 09/10/2025 9:50 am, Jan Beulich wrote:
>> 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")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> For 4.21, surely?

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

Jan
Re: [PATCH for-4.21] x86/HWP: adjust feature_hdc's section annotation
Posted by Jason Andryuk 3 weeks ago
On 2025-10-09 05:09, Jan Beulich wrote:
> On 09.10.2025 11:07, Andrew Cooper wrote:
>> On 09/10/2025 9:50 am, Jan Beulich wrote:
>>> 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")
>>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>>
>> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>
>> For 4.21, surely?
> 
> Definitely, forgot to tag it accordingly, but Cc-ed Oleksii be this reason.

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>

Thanks,
Jason