about summary refs log tree commit diff
path: root/sysdeps/x86/tst-cpu-features-cpuinfo.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-06-05 06:42:20 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-07-23 05:12:51 -0700
commit7c124e3714c38157230ed1a5d743b37defe64dc2 (patch)
treef1e13e18239c4421675234b56d880ae081d4bdcd /sysdeps/x86/tst-cpu-features-cpuinfo.c
parent5b8d271571434a74b2464c278eafe2ff81f31029 (diff)
downloadglibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.gz
glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.xz
glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.zip
x86: Install <bits/platform/x86.h> [BZ #27958]
1. Install <bits/platform/x86.h> for <sys/platform/x86.h> which includes
<bits/platform/x86.h>.
2. Rename HAS_CPU_FEATURE to CPU_FEATURE_PRESENT which checks if the
processor has the feature.
3. Rename CPU_FEATURE_USABLE to CPU_FEATURE_ACTIVE which checks if the
feature is active.  There may be other preconditions, like sufficient
stack space or further setup for AMX, which must be satisfied before the
feature can be used.

This fixes BZ #27958.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/x86/tst-cpu-features-cpuinfo.c')
-rw-r--r--sysdeps/x86/tst-cpu-features-cpuinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
index 76bf5b2653..2d4927f5e5 100644
--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
+++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
@@ -55,7 +55,7 @@ get_cpuinfo (void)
 
 int
 check_proc (const char *proc_name, const char *search_name, int flag,
-	    int usable, const char *name)
+	    int active, const char *name)
 {
   int found = 0;
 
@@ -79,7 +79,7 @@ check_proc (const char *proc_name, const char *search_name, int flag,
 
   if (found != flag)
     {
-      if (found || usable)
+      if (found || active)
 	printf (" *** failure ***\n");
       else
 	{