x86: Remove the duplicated CPU_FEATURE_CPU_P

Message ID 20201224041313.294603-1-hjl.tools@gmail.com
State New
Headers show
Series
  • x86: Remove the duplicated CPU_FEATURE_CPU_P
Related show

Commit Message

H.J. Lu via Libc-alpha Dec. 24, 2020, 4:13 a.m.
CPU_FEATURE_CPU_P is defined in sysdeps/x86/sys/platform/x86.h.  Remove
the duplicated CPU_FEATURE_CPU_P in sysdeps/x86/include/cpu-features.h.
---
 sysdeps/x86/include/cpu-features.h | 2 --
 1 file changed, 2 deletions(-)

-- 
2.29.2

Comments

H.J. Lu via Libc-alpha Dec. 24, 2020, 12:37 p.m. | #1
On Wed, Dec 23, 2020 at 8:13 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>

> CPU_FEATURE_CPU_P is defined in sysdeps/x86/sys/platform/x86.h.  Remove

> the duplicated CPU_FEATURE_CPU_P in sysdeps/x86/include/cpu-features.h.

> ---

>  sysdeps/x86/include/cpu-features.h | 2 --

>  1 file changed, 2 deletions(-)

>

> diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h

> index f62be0b9b3..0df57d9a17 100644

> --- a/sysdeps/x86/include/cpu-features.h

> +++ b/sysdeps/x86/include/cpu-features.h

> @@ -57,8 +57,6 @@ enum

>       |= ptr->features[index_cpu_##name].cpuid.reg_##name & bit_cpu_##name;

>  # define CPU_FEATURE_PREFERRED_P(ptr, name) \

>    ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0)

> -# define CPU_FEATURE_CPU_P(ptr, name) \

> -  CPU_FEATURE_CHECK_P (ptr, name, cpuid)

>

>  /* HAS_CPU_FEATURE evaluates to true if CPU supports the feature.  */

>  # undef HAS_CPU_FEATURE

> --

> 2.29.2

>


I am checking it in.

-- 
H.J.
Florian Weimer Dec. 24, 2020, 7:20 p.m. | #2
* H. J. Lu via Libc-alpha:

> CPU_FEATURE_CPU_P is defined in sysdeps/x86/sys/platform/x86.h.  Remove

> the duplicated CPU_FEATURE_CPU_P in sysdeps/x86/include/cpu-features.h.

> ---

>  sysdeps/x86/include/cpu-features.h | 2 --

>  1 file changed, 2 deletions(-)

>

> diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h

> index f62be0b9b3..0df57d9a17 100644

> --- a/sysdeps/x86/include/cpu-features.h

> +++ b/sysdeps/x86/include/cpu-features.h

> @@ -57,8 +57,6 @@ enum

>       |= ptr->features[index_cpu_##name].cpuid.reg_##name & bit_cpu_##name;

>  # define CPU_FEATURE_PREFERRED_P(ptr, name) \

>    ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0)

> -# define CPU_FEATURE_CPU_P(ptr, name) \

> -  CPU_FEATURE_CHECK_P (ptr, name, cpuid)

>  

>  /* HAS_CPU_FEATURE evaluates to true if CPU supports the feature.  */

>  # undef HAS_CPU_FEATURE


There's also some _ISOMAC cruft in this file which should not be
needed because <cpu-features.h> is not an installed header.

Patch

diff --git a/sysdeps/x86/include/cpu-features.h b/sysdeps/x86/include/cpu-features.h
index f62be0b9b3..0df57d9a17 100644
--- a/sysdeps/x86/include/cpu-features.h
+++ b/sysdeps/x86/include/cpu-features.h
@@ -57,8 +57,6 @@  enum
      |= ptr->features[index_cpu_##name].cpuid.reg_##name & bit_cpu_##name;
 # define CPU_FEATURE_PREFERRED_P(ptr, name) \
   ((ptr->preferred[index_arch_##name] & bit_arch_##name) != 0)
-# define CPU_FEATURE_CPU_P(ptr, name) \
-  CPU_FEATURE_CHECK_P (ptr, name, cpuid)
 
 /* HAS_CPU_FEATURE evaluates to true if CPU supports the feature.  */
 # undef HAS_CPU_FEATURE