From 663495e216228a55e353fa7fa6f9ed57d6bad237 Mon Sep 17 00:00:00 2001 From: Liao Xuan Date: Tue, 27 Jan 2026 16:51:57 +0800 Subject: [PATCH] perf/x86/uncore: Add DF PMU support for Hygon family 18h model 18h commit dbab1265fda0034466e3d7b1d7c4e1877fbf84d2 anolis. ANBZ: #30150 Adjust the DF PMU event and umask for Hygon family 18h model 18h processor. Hygon-SIG: commit none hygon anolis: perf/x86/uncore: Add DF PMU support for Hygon family 18h model 18h Hygon-SIG: commit dbab1265fda0 anolis anolis: perf/x86/uncore: Add DF PMU support for Hygon family 18h model 18h Backport from anolis to support Hygon family 18h model 18h Signed-off-by: Liao Xuan Cc: hygon-arch@list.openanolis.cn Reviewed-by Guixin Liu Link: https://gitee.com/anolis/cloud-kernel/pulls/6464 [ YuntongJin: amend commit log ] Signed-off-by: YuntongJin --- arch/x86/events/amd/uncore.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index cb0aa2e93d06..c7831fdef5cc 100644 --- a/arch/x86/events/amd/uncore.c +++ b/arch/x86/events/amd/uncore.c @@ -742,10 +742,8 @@ static int __init amd_uncore_init(void) 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 || - boot_cpu_data.x86_model == 0x7 || - boot_cpu_data.x86_model == 0x8 || - boot_cpu_data.x86_model == 0x10) + else if (boot_cpu_data.x86_model >= 0x6 && + boot_cpu_data.x86_model <= 0x18) *df_attr++ = &format_attr_umask12f18h.attr; } -- Gitee