diff mbox series

[8/8] selftests: x86: amx: Remove unused functions

Message ID 20240501122918.3831734-9-usama.anjum@collabora.com (mailing list archive)
State New
Headers show
Series selftests: x86: build suite with clang | expand

Commit Message

Muhammad Usama Anjum May 1, 2024, 12:29 p.m. UTC
Remove unused code.

amx.c:42:24: warning: unused function 'xgetbv' [-Wunused-function]
   42 | static inline uint64_t xgetbv(uint32_t index)
      |                        ^~~~~~
amx.c:167:24: warning: unused function 'get_xstatebv' [-Wunused-function]
  167 | static inline uint64_t get_xstatebv(struct xsave_buffer *buffer)
      |                        ^~~~~~~~~~~~

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
 tools/testing/selftests/x86/amx.c | 16 ----------------
 1 file changed, 16 deletions(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/x86/amx.c b/tools/testing/selftests/x86/amx.c
index 95aad6d8849be..1fdf35a4d7f63 100644
--- a/tools/testing/selftests/x86/amx.c
+++ b/tools/testing/selftests/x86/amx.c
@@ -39,16 +39,6 @@  struct xsave_buffer {
 	};
 };
 
-static inline uint64_t xgetbv(uint32_t index)
-{
-	uint32_t eax, edx;
-
-	asm volatile("xgetbv;"
-		     : "=a" (eax), "=d" (edx)
-		     : "c" (index));
-	return eax + ((uint64_t)edx << 32);
-}
-
 static inline void xsave(struct xsave_buffer *xbuf, uint64_t rfbm)
 {
 	uint32_t rfbm_lo = rfbm;
@@ -164,12 +154,6 @@  static inline void clear_xstate_header(struct xsave_buffer *buffer)
 	memset(&buffer->header, 0, sizeof(buffer->header));
 }
 
-static inline uint64_t get_xstatebv(struct xsave_buffer *buffer)
-{
-	/* XSTATE_BV is at the beginning of the header: */
-	return *(uint64_t *)&buffer->header;
-}
-
 static inline void set_xstatebv(struct xsave_buffer *buffer, uint64_t bv)
 {
 	/* XSTATE_BV is at the beginning of the header: */