[PATCH] x86/bitops: Drop include of cpufeatureset

Andrew Cooper posted 1 patch 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20230504130755.3181176-1-andrew.cooper3@citrix.com
xen/arch/x86/include/asm/bitops.h | 1 -
1 file changed, 1 deletion(-)
[PATCH] x86/bitops: Drop include of cpufeatureset
Posted by Andrew Cooper 1 year ago
Nothing in x86/bitops uses anything from x86/cpufeatureset, and it is creating
problems when trying to untangle other aspects of feature handling.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Wei Liu <wl@xen.org>
---
 xen/arch/x86/include/asm/bitops.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
index 5a71afbc89d5..aa8bd65b4565 100644
--- a/xen/arch/x86/include/asm/bitops.h
+++ b/xen/arch/x86/include/asm/bitops.h
@@ -6,7 +6,6 @@
  */
 
 #include <asm/alternative.h>
-#include <asm/cpufeatureset.h>
 
 /*
  * We specify the memory operand as both input and output because the memory
-- 
2.30.2


Re: [PATCH] x86/bitops: Drop include of cpufeatureset
Posted by Jan Beulich 1 year ago
On 04.05.2023 15:07, Andrew Cooper wrote:
> Nothing in x86/bitops uses anything from x86/cpufeatureset, and it is creating
> problems when trying to untangle other aspects of feature handling.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> CC: Wei Liu <wl@xen.org>
> ---
>  xen/arch/x86/include/asm/bitops.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
> index 5a71afbc89d5..aa8bd65b4565 100644
> --- a/xen/arch/x86/include/asm/bitops.h
> +++ b/xen/arch/x86/include/asm/bitops.h
> @@ -6,7 +6,6 @@
>   */
>  
>  #include <asm/alternative.h>
> -#include <asm/cpufeatureset.h>

Prior to your 44325775f724 ("x86/cpuid: Untangle the <asm/cpufeature.h>
include hierachy") it was asm/cpufeature.h that was included here,
presumably for the use of X86_FEATURE_BMI1 in __scanbit(). I guess that
wants to be asm/cpufeatures.h now instead?

Jan

Re: [PATCH] x86/bitops: Drop include of cpufeatureset
Posted by Andrew Cooper 1 year ago
On 04/05/2023 2:20 pm, Jan Beulich wrote:
> On 04.05.2023 15:07, Andrew Cooper wrote:
>> Nothing in x86/bitops uses anything from x86/cpufeatureset, and it is creating
>> problems when trying to untangle other aspects of feature handling.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: Jan Beulich <JBeulich@suse.com>
>> CC: Roger Pau Monné <roger.pau@citrix.com>
>> CC: Wei Liu <wl@xen.org>
>> ---
>>  xen/arch/x86/include/asm/bitops.h | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h
>> index 5a71afbc89d5..aa8bd65b4565 100644
>> --- a/xen/arch/x86/include/asm/bitops.h
>> +++ b/xen/arch/x86/include/asm/bitops.h
>> @@ -6,7 +6,6 @@
>>   */
>>  
>>  #include <asm/alternative.h>
>> -#include <asm/cpufeatureset.h>
> Prior to your 44325775f724 ("x86/cpuid: Untangle the <asm/cpufeature.h>
> include hierachy") it was asm/cpufeature.h that was included here,
> presumably for the use of X86_FEATURE_BMI1 in __scanbit(). I guess that
> wants to be asm/cpufeatures.h now instead?

Oh.  I missed that, but nothing fails to compile, which means that
there's a prior path including cpufeatureset anyway.

I think I'll drop this and leave the header rearranging to a later
point.  I ended up having to do the untangling differently anyway.

~Andrew