From: "Chang S. Bae" <chang.seok.bae@intel.com>
To: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: shuah@kernel.org, tglx@linutronix.de,
dave.hansen@linux.intel.com, bp@alien8.de,
chang.seok.bae@intel.com
Subject: [PATCH v3 3/3] selftests/x86/amx: Remove unneeded code
Date: Thu, 30 Mar 2023 16:35:20 -0700 [thread overview]
Message-ID: <20230330233520.21937-4-chang.seok.bae@intel.com> (raw)
In-Reply-To: <20230330233520.21937-1-chang.seok.bae@intel.com>
Remove some unused helper code. Also, get rid of the redundant permission
request.
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kselftest@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Changes from v2:
* Add as a new patch
---
tools/testing/selftests/x86/amx.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/tools/testing/selftests/x86/amx.c b/tools/testing/selftests/x86/amx.c
index f0b1efe89ef7..854f7d61be89 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;
@@ -110,8 +100,6 @@ static struct {
#define CPUID_LEAF_XSTATE 0xd
#define CPUID_SUBLEAF_XSTATE_USER 0x0
-#define TILE_CPUID 0x1d
-#define TILE_PALETTE_ID 0x1
static void check_cpuid_xtiledata(void)
{
@@ -161,12 +149,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: */
@@ -769,8 +751,6 @@ static void test_context_switch(void)
/* Affinitize to one CPU to force context switches */
affinitize_cpu0();
- req_xtiledata_perm();
-
printf("[RUN]\tCheck tiledata context switches, %d iterations, %d threads.\n",
ctxtswtest_config.iterations,
ctxtswtest_config.num_threads);
--
2.17.1
prev parent reply other threads:[~2023-03-30 23:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 17:03 [PATCH v2 0/2] selftests/x86: AMX-related test improvements Chang S. Bae
2022-07-11 17:03 ` [PATCH v2 1/2] selftests/x86/signal: Adjust the test to the kernel's altstack check Chang S. Bae
2022-07-11 17:03 ` [PATCH v2 2/2] selftests/x86/amx: Fix the test to avoid failure when AMX is unavailable Chang S. Bae
2023-03-30 23:35 ` [PATCH v3 0/3] selftests/x86: AMX-related test improvements Chang S. Bae
2023-03-30 23:35 ` [PATCH v3 1/3] selftests/x86/sigaltstack: Adjust the test to the kernel's altstack check Chang S. Bae
2023-03-30 23:35 ` [PATCH v3 2/3] selftests/x86/amx: Fix the test to avoid failure when AMX is unavailable Chang S. Bae
2023-03-30 23:35 ` Chang S. Bae [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230330233520.21937-4-chang.seok.bae@intel.com \
--to=chang.seok.bae@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox