From 9bfc1e1d9ecff5186cb021fc257400b141cfabe3 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Thu, 27 Mar 2025 10:56:34 +0800 Subject: [PATCH] perf/x86/uncore: Add DF PMU support for Hygon family 18h model 8h Adjust the DF PMU event and umask for Hygon family 18h model 8h processor. Signed-off-by: Qi Liu --- arch/x86/events/amd/uncore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/events/amd/uncore.c b/arch/x86/events/amd/uncore.c index 5bc616a638f0..d15122a23e75 100644 --- a/arch/x86/events/amd/uncore.c +++ b/arch/x86/events/amd/uncore.c @@ -246,6 +246,7 @@ static int amd_uncore_event_init(struct perf_event *event) event_mask = HYGON_F18H_M4H_RAW_EVENT_MASK_NB; 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) event_mask = HYGON_F18H_M6H_RAW_EVENT_MASK_NB; } @@ -743,6 +744,7 @@ static int __init amd_uncore_init(void) *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) *df_attr++ = &format_attr_umask12f18h.attr; } -- Gitee