diff mbox series

x86: Change ENQCMD test to CHECK_FEATURE_PRESENT

Message ID 20240227194331.2023037-1-hjl.tools@gmail.com
State New
Headers show
Series x86: Change ENQCMD test to CHECK_FEATURE_PRESENT | expand

Commit Message

H.J. Lu Feb. 27, 2024, 7:43 p.m. UTC
Since ENQCMD is mainly used in kernel, change the ENQCMD test to
CHECK_FEATURE_PRESENT.
---
 sysdeps/x86/tst-cpu-features-supports.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Noah Goldstein Feb. 27, 2024, 7:48 p.m. UTC | #1
On Tue, Feb 27, 2024 at 1:43 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Since ENQCMD is mainly used in kernel, change the ENQCMD test to
> CHECK_FEATURE_PRESENT.
> ---
>  sysdeps/x86/tst-cpu-features-supports.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c
> index 93008dac70..e270c29db7 100644
> --- a/sysdeps/x86/tst-cpu-features-supports.c
> +++ b/sysdeps/x86/tst-cpu-features-supports.c
> @@ -115,7 +115,7 @@ do_test (int argc, char **argv)
>  #if __GNUC_PREREQ (11, 0)
>    fails += CHECK_FEATURE_ACTIVE (cmpxchg16b, CMPXCHG16B);
>    fails += CHECK_FEATURE_ACTIVE (cmpxchg8b, CX8);
> -  fails += CHECK_FEATURE_ACTIVE (enqcmd, ENQCMD);
> +  fails += CHECK_FEATURE_PRESENT (enqcmd, ENQCMD);
>    fails += CHECK_FEATURE_ACTIVE (f16c, F16C);
>  #endif
>  #if __GNUC_PREREQ (4, 9)
> --
> 2.43.2
>

LGTM.
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
diff mbox series

Patch

diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c
index 93008dac70..e270c29db7 100644
--- a/sysdeps/x86/tst-cpu-features-supports.c
+++ b/sysdeps/x86/tst-cpu-features-supports.c
@@ -115,7 +115,7 @@  do_test (int argc, char **argv)
 #if __GNUC_PREREQ (11, 0)
   fails += CHECK_FEATURE_ACTIVE (cmpxchg16b, CMPXCHG16B);
   fails += CHECK_FEATURE_ACTIVE (cmpxchg8b, CX8);
-  fails += CHECK_FEATURE_ACTIVE (enqcmd, ENQCMD);
+  fails += CHECK_FEATURE_PRESENT (enqcmd, ENQCMD);
   fails += CHECK_FEATURE_ACTIVE (f16c, F16C);
 #endif
 #if __GNUC_PREREQ (4, 9)