bb8dcb4304
Signed-off-by: Pingfan Liu <piliu@redhat.com>
266 lines
7.3 KiB
Diff
266 lines
7.3 KiB
Diff
From f39f29d200b83c568748afc4483feb544b4f6bd6 Mon Sep 17 00:00:00 2001
|
|
From: Sandipan Das <sandipan.das@amd.com>
|
|
Date: Wed, 16 Feb 2022 16:01:18 +0530
|
|
Subject: [PATCH 04/15] x86: Prepare for multi-vendor support
|
|
|
|
In order to support x86 processors from other vendors, move
|
|
existing platform-specific code for Intel processors to the
|
|
new x86 directory and update the build files accordingly.
|
|
|
|
Signed-off-by: Sandipan Das <sandipan.das@amd.com>
|
|
---
|
|
Makefile.am | 36 ++++++++++++++++-----------------
|
|
README.md | 2 +-
|
|
common/include/os/plat.h | 2 +-
|
|
common/include/types.h | 2 +-
|
|
configure.ac | 2 +-
|
|
test/mgen/{intel => x86}/util.c | 0
|
|
{intel => x86}/bdw.c | 0
|
|
{intel => x86}/include/bdw.h | 0
|
|
{intel => x86}/include/nhm.h | 0
|
|
{intel => x86}/include/skl.h | 0
|
|
{intel => x86}/include/snb.h | 0
|
|
{intel => x86}/include/types.h | 6 +++---
|
|
{intel => x86}/include/util.h | 6 +++---
|
|
{intel => x86}/include/wsm.h | 0
|
|
{intel => x86}/nhm.c | 0
|
|
{intel => x86}/plat.c | 0
|
|
{intel => x86}/skl.c | 0
|
|
{intel => x86}/snb.c | 0
|
|
{intel => x86}/ui_perf_map.c | 0
|
|
{intel => x86}/util.c | 0
|
|
{intel => x86}/wsm.c | 0
|
|
21 files changed, 28 insertions(+), 28 deletions(-)
|
|
rename test/mgen/{intel => x86}/util.c (100%)
|
|
rename {intel => x86}/bdw.c (100%)
|
|
rename {intel => x86}/include/bdw.h (100%)
|
|
rename {intel => x86}/include/nhm.h (100%)
|
|
rename {intel => x86}/include/skl.h (100%)
|
|
rename {intel => x86}/include/snb.h (100%)
|
|
rename {intel => x86}/include/types.h (95%)
|
|
rename {intel => x86}/include/util.h (94%)
|
|
rename {intel => x86}/include/wsm.h (100%)
|
|
rename {intel => x86}/nhm.c (100%)
|
|
rename {intel => x86}/plat.c (100%)
|
|
rename {intel => x86}/skl.c (100%)
|
|
rename {intel => x86}/snb.c (100%)
|
|
rename {intel => x86}/ui_perf_map.c (100%)
|
|
rename {intel => x86}/util.c (100%)
|
|
rename {intel => x86}/wsm.c (100%)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index 643704a..438a9fc 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -58,23 +58,23 @@ libnumatop_la_SOURCES = \
|
|
common/util.c \
|
|
common/win.c
|
|
|
|
-if CPU_INTEL
|
|
+if CPU_X86
|
|
libnumatop_la_SOURCES += \
|
|
- intel/include/bdw.h \
|
|
- intel/include/nhm.h \
|
|
- intel/include/skl.h \
|
|
- intel/include/snb.h \
|
|
- intel/include/types.h \
|
|
- intel/include/util.h \
|
|
- intel/include/wsm.h \
|
|
- intel/bdw.c \
|
|
- intel/nhm.c \
|
|
- intel/plat.c \
|
|
- intel/skl.c \
|
|
- intel/snb.c \
|
|
- intel/ui_perf_map.c \
|
|
- intel/util.c \
|
|
- intel/wsm.c
|
|
+ x86/include/bdw.h \
|
|
+ x86/include/nhm.h \
|
|
+ x86/include/skl.h \
|
|
+ x86/include/snb.h \
|
|
+ x86/include/types.h \
|
|
+ x86/include/util.h \
|
|
+ x86/include/wsm.h \
|
|
+ x86/bdw.c \
|
|
+ x86/nhm.c \
|
|
+ x86/plat.c \
|
|
+ x86/skl.c \
|
|
+ x86/snb.c \
|
|
+ x86/ui_perf_map.c \
|
|
+ x86/util.c \
|
|
+ x86/wsm.c
|
|
endif
|
|
|
|
if CPU_PPC
|
|
@@ -106,9 +106,9 @@ if CPU_PPC
|
|
mgen_SOURCES += \
|
|
test/mgen/powerpc/util.c
|
|
endif
|
|
-if CPU_INTEL
|
|
+if CPU_X86
|
|
mgen_SOURCES += \
|
|
- test/mgen/intel/util.c
|
|
+ test/mgen/x86/util.c
|
|
endif
|
|
|
|
TESTS = test/mgen.01.sh test/mgen.02.sh
|
|
diff --git a/README.md b/README.md
|
|
index d16a486..e96f0a8 100644
|
|
--- a/README.md
|
|
+++ b/README.md
|
|
@@ -58,7 +58,7 @@ http://www.gossamer-threads.com/lists/linux/kernel/1964864
|
|
|
|
common: common code for all platforms.
|
|
|
|
-intel : Intel platform-specific code.
|
|
+x86 : Intel platform-specific code.
|
|
|
|
powerpc: PowerPC platform-specific code.
|
|
|
|
diff --git a/common/include/os/plat.h b/common/include/os/plat.h
|
|
index 35629dc..e35093d 100644
|
|
--- a/common/include/os/plat.h
|
|
+++ b/common/include/os/plat.h
|
|
@@ -35,7 +35,7 @@
|
|
#ifdef __powerpc64__
|
|
#include "../../../powerpc/include/types.h"
|
|
#else
|
|
-#include "../../../intel/include/types.h"
|
|
+#include "../../../x86/include/types.h"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
diff --git a/common/include/types.h b/common/include/types.h
|
|
index fc9c592..3e30f7c 100644
|
|
--- a/common/include/types.h
|
|
+++ b/common/include/types.h
|
|
@@ -34,7 +34,7 @@
|
|
#ifdef __powerpc64__
|
|
#include "../../powerpc/include/types.h"
|
|
#else
|
|
-#include "../../intel/include/types.h"
|
|
+#include "../../x86/include/types.h"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 36edcc5..71fa92d 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -10,7 +10,7 @@ LT_INIT
|
|
AC_CONFIG_MACRO_DIRS([m4])
|
|
|
|
AC_CANONICAL_HOST
|
|
-AM_CONDITIONAL(CPU_INTEL, test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xi686")
|
|
+AM_CONDITIONAL(CPU_X86, test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xi686")
|
|
AM_CONDITIONAL(CPU_PPC, test "x$host_cpu" = "xpowerpc64" -o "x$host_cpu" = "xpowerpc64le")
|
|
|
|
# Checks for programs.
|
|
diff --git a/test/mgen/intel/util.c b/test/mgen/x86/util.c
|
|
similarity index 100%
|
|
rename from test/mgen/intel/util.c
|
|
rename to test/mgen/x86/util.c
|
|
diff --git a/intel/bdw.c b/x86/bdw.c
|
|
similarity index 100%
|
|
rename from intel/bdw.c
|
|
rename to x86/bdw.c
|
|
diff --git a/intel/include/bdw.h b/x86/include/bdw.h
|
|
similarity index 100%
|
|
rename from intel/include/bdw.h
|
|
rename to x86/include/bdw.h
|
|
diff --git a/intel/include/nhm.h b/x86/include/nhm.h
|
|
similarity index 100%
|
|
rename from intel/include/nhm.h
|
|
rename to x86/include/nhm.h
|
|
diff --git a/intel/include/skl.h b/x86/include/skl.h
|
|
similarity index 100%
|
|
rename from intel/include/skl.h
|
|
rename to x86/include/skl.h
|
|
diff --git a/intel/include/snb.h b/x86/include/snb.h
|
|
similarity index 100%
|
|
rename from intel/include/snb.h
|
|
rename to x86/include/snb.h
|
|
diff --git a/intel/include/types.h b/x86/include/types.h
|
|
similarity index 95%
|
|
rename from intel/include/types.h
|
|
rename to x86/include/types.h
|
|
index 76c7ad3..1a15b3a 100644
|
|
--- a/intel/include/types.h
|
|
+++ b/x86/include/types.h
|
|
@@ -27,8 +27,8 @@
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
-#ifndef _NUMATOP_INTEL_TYPES_H
|
|
-#define _NUMATOP_INTEL_TYPES_H
|
|
+#ifndef _NUMATOP_X86_TYPES_H
|
|
+#define _NUMATOP_X86_TYPES_H
|
|
|
|
#include "../../common/include/types.h"
|
|
|
|
@@ -62,4 +62,4 @@ typedef enum {
|
|
|
|
#define PERF_COUNT_NUM 5
|
|
|
|
-#endif /* _NUMATOP_INTEL_TYPES_H */
|
|
+#endif /* _NUMATOP_X86_TYPES_H */
|
|
diff --git a/intel/include/util.h b/x86/include/util.h
|
|
similarity index 94%
|
|
rename from intel/include/util.h
|
|
rename to x86/include/util.h
|
|
index 7026e99..37a6300 100644
|
|
--- a/intel/include/util.h
|
|
+++ b/x86/include/util.h
|
|
@@ -27,8 +27,8 @@
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
-#ifndef _NUMATOP_INTEL_UTIL_H
|
|
-#define _NUMATOP_INTEL_UTIL_H
|
|
+#ifndef _NUMATOP_X86_UTIL_H
|
|
+#define _NUMATOP_X86_UTIL_H
|
|
|
|
#define CPU_FAMILY(eax) \
|
|
(((eax) & 0x0F00) >> 8)
|
|
@@ -39,4 +39,4 @@
|
|
#define CPU_EXT_MODEL(eax) \
|
|
(((eax) & 0xF0000) >> 16)
|
|
|
|
-#endif /* _NUMATOP_INTEL_UTIL_H */
|
|
+#endif /* _NUMATOP_X86_UTIL_H */
|
|
diff --git a/intel/include/wsm.h b/x86/include/wsm.h
|
|
similarity index 100%
|
|
rename from intel/include/wsm.h
|
|
rename to x86/include/wsm.h
|
|
diff --git a/intel/nhm.c b/x86/nhm.c
|
|
similarity index 100%
|
|
rename from intel/nhm.c
|
|
rename to x86/nhm.c
|
|
diff --git a/intel/plat.c b/x86/plat.c
|
|
similarity index 100%
|
|
rename from intel/plat.c
|
|
rename to x86/plat.c
|
|
diff --git a/intel/skl.c b/x86/skl.c
|
|
similarity index 100%
|
|
rename from intel/skl.c
|
|
rename to x86/skl.c
|
|
diff --git a/intel/snb.c b/x86/snb.c
|
|
similarity index 100%
|
|
rename from intel/snb.c
|
|
rename to x86/snb.c
|
|
diff --git a/intel/ui_perf_map.c b/x86/ui_perf_map.c
|
|
similarity index 100%
|
|
rename from intel/ui_perf_map.c
|
|
rename to x86/ui_perf_map.c
|
|
diff --git a/intel/util.c b/x86/util.c
|
|
similarity index 100%
|
|
rename from intel/util.c
|
|
rename to x86/util.c
|
|
diff --git a/intel/wsm.c b/x86/wsm.c
|
|
similarity index 100%
|
|
rename from intel/wsm.c
|
|
rename to x86/wsm.c
|
|
--
|
|
2.31.1
|
|
|