From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 4/9] selftests/powerpc: Include asm/cputable.h from utils.h
Date: Wed, 19 Aug 2020 11:57:22 +1000 [thread overview]
Message-ID: <20200819015727.1977134-4-mpe@ellerman.id.au> (raw)
In-Reply-To: <20200819015727.1977134-1-mpe@ellerman.id.au>
utils.h provides have_hwcap() and have_hwcap2() which check for a
feature bit. Those bits are defined in asm/cputable.h, so include it
in utils.h so users of utils.h don't have to do it manually.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
tools/testing/selftests/powerpc/alignment/alignment_handler.c | 2 --
tools/testing/selftests/powerpc/include/utils.h | 1 +
tools/testing/selftests/powerpc/pmu/count_stcx_fail.c | 1 -
tools/testing/selftests/powerpc/pmu/per_event_excludes.c | 2 --
tools/testing/selftests/powerpc/stringloops/memcmp.c | 2 +-
tools/testing/selftests/powerpc/tm/tm.h | 3 +--
6 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/powerpc/alignment/alignment_handler.c b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
index 55ef15184057..e4063eba4a5b 100644
--- a/tools/testing/selftests/powerpc/alignment/alignment_handler.c
+++ b/tools/testing/selftests/powerpc/alignment/alignment_handler.c
@@ -55,8 +55,6 @@
#include <setjmp.h>
#include <signal.h>
-#include <asm/cputable.h>
-
#include "utils.h"
#include "instructions.h"
diff --git a/tools/testing/selftests/powerpc/include/utils.h b/tools/testing/selftests/powerpc/include/utils.h
index bba400d1bb90..052b5a775dc2 100644
--- a/tools/testing/selftests/powerpc/include/utils.h
+++ b/tools/testing/selftests/powerpc/include/utils.h
@@ -12,6 +12,7 @@
#include <stdbool.h>
#include <linux/auxvec.h>
#include <linux/perf_event.h>
+#include <asm/cputable.h>
#include "reg.h"
/* Avoid headaches with PRI?64 - just use %ll? always */
diff --git a/tools/testing/selftests/powerpc/pmu/count_stcx_fail.c b/tools/testing/selftests/powerpc/pmu/count_stcx_fail.c
index 2980abca31e0..2070a1e2b3a5 100644
--- a/tools/testing/selftests/powerpc/pmu/count_stcx_fail.c
+++ b/tools/testing/selftests/powerpc/pmu/count_stcx_fail.c
@@ -9,7 +9,6 @@
#include <stdbool.h>
#include <string.h>
#include <sys/prctl.h>
-#include <asm/cputable.h>
#include "event.h"
#include "utils.h"
diff --git a/tools/testing/selftests/powerpc/pmu/per_event_excludes.c b/tools/testing/selftests/powerpc/pmu/per_event_excludes.c
index 2d37942bf72b..ad32a09a6540 100644
--- a/tools/testing/selftests/powerpc/pmu/per_event_excludes.c
+++ b/tools/testing/selftests/powerpc/pmu/per_event_excludes.c
@@ -12,8 +12,6 @@
#include <string.h>
#include <sys/prctl.h>
-#include <asm/cputable.h>
-
#include "event.h"
#include "lib.h"
#include "utils.h"
diff --git a/tools/testing/selftests/powerpc/stringloops/memcmp.c b/tools/testing/selftests/powerpc/stringloops/memcmp.c
index 979df3d98368..cb2f18855c8d 100644
--- a/tools/testing/selftests/powerpc/stringloops/memcmp.c
+++ b/tools/testing/selftests/powerpc/stringloops/memcmp.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <sys/mman.h>
#include <time.h>
-#include <asm/cputable.h>
+
#include "utils.h"
#define SIZE 256
diff --git a/tools/testing/selftests/powerpc/tm/tm.h b/tools/testing/selftests/powerpc/tm/tm.h
index c402464b038f..c5a1e5c163fc 100644
--- a/tools/testing/selftests/powerpc/tm/tm.h
+++ b/tools/testing/selftests/powerpc/tm/tm.h
@@ -6,9 +6,8 @@
#ifndef _SELFTESTS_POWERPC_TM_TM_H
#define _SELFTESTS_POWERPC_TM_TM_H
-#include <asm/tm.h>
-#include <asm/cputable.h>
#include <stdbool.h>
+#include <asm/tm.h>
#include "utils.h"
--
2.25.1
next prev parent reply other threads:[~2020-08-19 2:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 1:57 [PATCH 1/9] selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac Michael Ellerman
2020-08-19 1:57 ` [PATCH 2/9] selftests/powerpc: Give the bad_accesses test longer to run Michael Ellerman
2020-08-19 1:57 ` [PATCH 3/9] selftests/powerpc: Move set_dscr() into rfi_flush.c Michael Ellerman
2020-08-19 1:57 ` Michael Ellerman [this message]
2020-08-19 1:57 ` [PATCH 5/9] selftests/powerpc: Don't run DSCR tests on old systems Michael Ellerman
2020-08-19 1:57 ` [PATCH 6/9] selftests/powerpc: Skip security tests on older CPUs Michael Ellerman
2020-08-19 1:57 ` [PATCH 7/9] selftests/powerpc: Skip L3 bank test " Michael Ellerman
2020-08-19 1:57 ` [PATCH 8/9] selftests/powerpc: Don't touch VMX/VSX " Michael Ellerman
2020-08-19 1:57 ` [PATCH 9/9] selftests/powerpc: Properly handle failure in switch_endian_test Michael Ellerman
2020-09-09 13:27 ` [PATCH 1/9] selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac Michael Ellerman
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=20200819015727.1977134-4-mpe@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
/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