446cf2
commit 7674695cf7e28528be7243ceb30c9a600bbaa7b5
446cf2
Author: H.J. Lu <hjl.tools@gmail.com>
446cf2
Date:   Thu Oct 8 08:19:15 2020 -0700
446cf2
446cf2
    <sys/platform/x86.h>: Add Intel UINTR support
446cf2
    
446cf2
    Add Intel UINTR support to <sys/platform/x86.h>.
446cf2
446cf2
diff --git a/manual/platform.texi b/manual/platform.texi
446cf2
index 95b0ed0642c9f8a9..0dd12a4353a93bf2 100644
446cf2
--- a/manual/platform.texi
446cf2
+++ b/manual/platform.texi
446cf2
@@ -583,6 +583,9 @@ using a TSC deadline value.
446cf2
 @item
446cf2
 @code{TSXLDTRK} -- TSXLDTRK instructions.
446cf2
 
446cf2
+@item
446cf2
+@code{UINTR} -- User interrupts.
446cf2
+
446cf2
 @item
446cf2
 @code{UMIP} -- User-mode instruction prevention.
446cf2
 
446cf2
diff --git a/sysdeps/x86/sys/platform/x86.h b/sysdeps/x86/sys/platform/x86.h
446cf2
index bcc81ab5f8ac8265..2760b81a56e6c7d7 100644
446cf2
--- a/sysdeps/x86/sys/platform/x86.h
446cf2
+++ b/sysdeps/x86/sys/platform/x86.h
446cf2
@@ -241,7 +241,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
446cf2
 #define bit_cpu_AVX512_4VNNIW	(1u << 2)
446cf2
 #define bit_cpu_AVX512_4FMAPS	(1u << 3)
446cf2
 #define bit_cpu_FSRM		(1u << 4)
446cf2
-#define bit_cpu_INDEX_7_EDX_5	(1u << 5)
446cf2
+#define bit_cpu_UINTR		(1u << 5)
446cf2
 #define bit_cpu_INDEX_7_EDX_6	(1u << 6)
446cf2
 #define bit_cpu_INDEX_7_EDX_7	(1u << 7)
446cf2
 #define bit_cpu_AVX512_VP2INTERSECT (1u << 8)
446cf2
@@ -460,7 +460,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
446cf2
 #define index_cpu_AVX512_4VNNIW COMMON_CPUID_INDEX_7
446cf2
 #define index_cpu_AVX512_4FMAPS	COMMON_CPUID_INDEX_7
446cf2
 #define index_cpu_FSRM		COMMON_CPUID_INDEX_7
446cf2
-#define index_cpu_INDEX_7_EDX_5	COMMON_CPUID_INDEX_7
446cf2
+#define index_cpu_UINTR		COMMON_CPUID_INDEX_7
446cf2
 #define index_cpu_INDEX_7_EDX_6	COMMON_CPUID_INDEX_7
446cf2
 #define index_cpu_INDEX_7_EDX_7	COMMON_CPUID_INDEX_7
446cf2
 #define index_cpu_AVX512_VP2INTERSECT COMMON_CPUID_INDEX_7
446cf2
@@ -679,7 +679,7 @@ extern const struct cpu_features *__x86_get_cpu_features (unsigned int)
446cf2
 #define reg_AVX512_4VNNIW	edx
446cf2
 #define reg_AVX512_4FMAPS	edx
446cf2
 #define reg_FSRM		edx
446cf2
-#define reg_INDEX_7_EDX_5	edx
446cf2
+#define reg_UINTR		edx
446cf2
 #define reg_INDEX_7_EDX_6	edx
446cf2
 #define reg_INDEX_7_EDX_7	edx
446cf2
 #define reg_AVX512_VP2INTERSECT	edx
446cf2
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c
446cf2
index 3ec94e0c9a191f36..6fa092a8c10486a0 100644
446cf2
--- a/sysdeps/x86/tst-get-cpu-features.c
446cf2
+++ b/sysdeps/x86/tst-get-cpu-features.c
446cf2
@@ -180,6 +180,7 @@ do_test (void)
446cf2
   CHECK_CPU_FEATURE (AVX512_4VNNIW);
446cf2
   CHECK_CPU_FEATURE (AVX512_4FMAPS);
446cf2
   CHECK_CPU_FEATURE (FSRM);
446cf2
+  CHECK_CPU_FEATURE (UINTR);
446cf2
   CHECK_CPU_FEATURE (AVX512_VP2INTERSECT);
446cf2
   CHECK_CPU_FEATURE (MD_CLEAR);
446cf2
   CHECK_CPU_FEATURE (SERIALIZE);