From 5332a1f4e7f975957a722db02685714ae4734b2f Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Mon, 29 Jul 2024 11:29:20 +0800 Subject: [PATCH] anolis: perf/x86/uncore: Add DF PMU support for Hygon family 18h model 5h, 7h and 10h ANBZ: #9590 Adjust the DF PMU event and umask for Hygon family 18h modle 5h, 7h and 10h processor. Signed-off-by: Qi Liu --- arch/x86/events/amd/uncore.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index 6ac6e16043e1..0b4da54fd6e9 100644 --- a/arch/x86/events/amd/uncore.c +++ b/arch/x86/events/amd/uncore.c @@ -754,9 +754,12 @@ int amd_uncore_df_ctx_init(struct amd_uncore *uncore, unsigned int cpu) } else if (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON && boot_cpu_data.x86 == 0x18) { *df_attr++ = &format_attr_event14f18h.attr; - if (boot_cpu_data.x86_model == 0x4) + if (boot_cpu_data.x86_model == 0x4 || + boot_cpu_data.x86_model == 0x5) *df_attr++ = &format_attr_umask10f18h.attr; - else if (boot_cpu_data.x86_model == 0x6) + else if (boot_cpu_data.x86_model == 0x6 || + boot_cpu_data.x86_model == 0x7 || + boot_cpu_data.x86_model == 0x10) *df_attr++ = &format_attr_umask12f18h.attr; } -- Gitee