From 26cf3ec769256235dfc1779ae5cffd15ebe540e9 Mon Sep 17 00:00:00 2001 From: Thomas Richter Date: Fri, 25 Oct 2024 14:19:29 +0200 Subject: [PATCH] cpumf: Move defines from source to header files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move defines from a source file lscpumf.c to the header file in the include directory to be reused in a follow on patch. Also reshuffle the list of defines in proper sequence of increasing numbers. Signed-off-by: Thomas Richter Reviewed-by: Hendrik Brueckner Signed-off-by: Jan Höppner --- cpumf/lscpumf.c | 7 ------- include/lib/libcpumf.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpumf/lscpumf.c b/cpumf/lscpumf.c index 946ab94e..373a15cf 100644 --- a/cpumf/lscpumf.c +++ b/cpumf/lscpumf.c @@ -162,13 +162,6 @@ static struct samples { /* Sample definition for all machines */ * Second version number: >3 Range 448 to 495 inclusive (48 counters) */ -#define CPUMF_CTRSET_NONE 0 -#define CPUMF_CTRSET_BASIC 2 -#define CPUMF_CTRSET_PROBLEM_STATE 4 -#define CPUMF_CTRSET_CRYPTO 8 -#define CPUMF_CTRSET_EXTENDED 1 -#define CPUMF_CTRSET_MT_DIAG 32 - struct counters { int ctrnum; int ctrset; diff --git a/include/lib/libcpumf.h b/include/lib/libcpumf.h index c577c895..65e7b092 100644 --- a/include/lib/libcpumf.h +++ b/include/lib/libcpumf.h @@ -20,6 +20,13 @@ #define S390_SYSFS_PAI_EXT "/sys/devices/pai_ext/" #define S390_SYSFS_PAI_NNPA S390_SYSFS_PAI_EXT "events/NNPA_ALL" +#define CPUMF_CTRSET_NONE 0 +#define CPUMF_CTRSET_EXTENDED 1 +#define CPUMF_CTRSET_BASIC 2 +#define CPUMF_CTRSET_PROBLEM_STATE 4 +#define CPUMF_CTRSET_CRYPTO 8 +#define CPUMF_CTRSET_MT_DIAG 32 + /** * Read out the PMU type from a given file. *