diff --git a/numatop-fix-missing-fields.patch b/numatop-fix-missing-fields.patch new file mode 100644 index 0000000..58134f0 --- /dev/null +++ b/numatop-fix-missing-fields.patch @@ -0,0 +1,36 @@ +From 8badd8cfed744c254520808890d7351b88e1b9c4 Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Wed, 31 Jul 2024 12:02:06 +0100 +Subject: [PATCH] x86: Fix missing fields for EMR support +Upstream: merged, not released + +There are two missing fields in the s_emr_config array causing +build issues with modern versions of gcc. Fix this. + +Fixes: d3fcffc6a9cc ("x86: Add initial support for EMR") +Signed-off-by: Colin Ian King +--- + x86/skl.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/x86/skl.c b/x86/skl.c +index 17cfbcc..a80a868 100644 +--- a/x86/skl.c ++++ b/x86/skl.c +@@ -64,11 +64,11 @@ static plat_event_config_t s_spr_config[PERF_COUNT_NUM] = { + }; + + static plat_event_config_t s_emr_config[PERF_COUNT_NUM] = { +- { PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES, 0x53, 0, "cpu_clk_unhalted.core" }, +- { PERF_TYPE_RAW, 0x012A, 0x53, 0x730000001, "off_core_response_0" }, +- { PERF_TYPE_HARDWARE, PERF_COUNT_HW_REF_CPU_CYCLES, 0x53, 0, "cpu_clk_unhalted.ref" }, +- { PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS, 0x53, 0, "instr_retired.any" }, +- { PERF_TYPE_RAW, 0x012B, 0x53, 0x104000001, "off_core_response_1" } ++ { PERF_TYPE_HARDWARE, PERF_COUNT_HW_CPU_CYCLES, 0x53, 0, 0, 0, "cpu_clk_unhalted.core" }, ++ { PERF_TYPE_RAW, 0x012A, 0x53, 0x730000001, 0, 0, "off_core_response_0" }, ++ { PERF_TYPE_HARDWARE, PERF_COUNT_HW_REF_CPU_CYCLES, 0x53, 0, 0, 0, "cpu_clk_unhalted.ref" }, ++ { PERF_TYPE_HARDWARE, PERF_COUNT_HW_INSTRUCTIONS, 0x53, 0, 0, 0, "instr_retired.any" }, ++ { PERF_TYPE_RAW, 0x012B, 0x53, 0x104000001, 0, 0, "off_core_response_1" } + }; + + static plat_event_config_t s_skl_ll = { diff --git a/numatop-power11.patch b/numatop-power11.patch new file mode 100644 index 0000000..3003272 --- /dev/null +++ b/numatop-power11.patch @@ -0,0 +1,43 @@ +From 50617b9a0e197a5261b3824d6e6309c034e99134 Mon Sep 17 00:00:00 2001 +From: Kajol Jain +Date: Fri, 12 Apr 2024 04:46:59 -0400 +Subject: [PATCH] numatop/powerpc: Add Power11 support +References: jsc#PED-9887, jsc#PED-10899 +Upstream: merged, not released + +Power11 is PowerISA v3.1 compliant processor and support Power10 events. +So using Power10 events to enable numatop in Power11 platform and to +count the per-process/per-thread memory accesses and CPU usage. + +Signed-off-by: Kajol Jain +--- + numatop.8 | 2 +- + powerpc/plat.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/numatop.8 b/numatop.8 +index 7237093..b09862e 100644 +--- a/numatop.8 ++++ b/numatop.8 +@@ -500,4 +500,4 @@ in 3.9. The following steps show how to get and apply the patch set. + \fBnumatop\fP supports the Intel Xeon processors: 5500-series, 6500/7500-series, + 5600 series, E7-x8xx-series, and E5-16xx/24xx/26xx/46xx-series. + \fBNote\fP: CPU microcode version 0x618 or 0x70c or later is required on +-E5-16xx/24xx/26xx/46xx-series. It also supports IBM Power8, Power9 and Power10 processors. ++E5-16xx/24xx/26xx/46xx-series. It also supports IBM Power8, Power9, Power10 and Power11 processors. +diff --git a/powerpc/plat.c b/powerpc/plat.c +index bed27d5..0ea262b 100644 +--- a/powerpc/plat.c ++++ b/powerpc/plat.c +@@ -93,6 +93,11 @@ plat_detect(void) + s_cpu_type = CPU_POWER10; + ret = 0; + break; ++ ++ case 0x82: ++ s_cpu_type = CPU_POWER10; ++ ret = 0; ++ break; + } + + return ret; diff --git a/numatop.changes b/numatop.changes index 128c046..d4b3065 100644 --- a/numatop.changes +++ b/numatop.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Oct 15 13:34:50 UTC 2024 - Vlastimil Babka + +- numatop-fix-missing-fields.patch: Fix building with recent gcc +- numatop-power11.patch: Support Power11 processors (jsc#PED-9887, + jsc#PED-10899) + ------------------------------------------------------------------- Tue Jan 16 08:11:17 UTC 2024 - Vlastimil Babka diff --git a/numatop.spec b/numatop.spec index 3c84397..ec1399a 100644 --- a/numatop.spec +++ b/numatop.spec @@ -32,6 +32,10 @@ BuildRequires: libtool BuildRequires: ncurses-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: x86_64 ppc64le +# PATCH-FIX-UPSTREAM numatop-fix-missing-fields.patch +Patch0: numatop-fix-missing-fields.patch +# PATCH-FEATURE-SLE numatop-power11.patch jsc#PED-9887 jsc#PED-10899 +Patch1: numatop-power11.patch %description NumaTOP is an observation tool for runtime memory locality characterization @@ -45,6 +49,7 @@ E5-16xx/24xx/26xx/46xx-series should be updated to latest CPU microcode %prep %setup -q -n %{name}-%{version} +%autopatch -p1 %build autoreconf -i