From 834a9bf30ae4805cd88c4b32789bd81cb562a269 Mon Sep 17 00:00:00 2001 From: LeoLiu-oc Date: Wed, 12 Nov 2025 20:50:24 +0800 Subject: [PATCH] perf/zhaoxin/core: Tailor FMS for KH-50000 zhaoxin inclusion category: feature -------------------- This patch adds support for CPU model 0x7b in the Zhaoxin PMU driver. It extends the existing switch statement in `zhaoxin_pmu_init` to handle this new CPU model, which is similar to the 0x6b model. Reviewed-by: Tony W. Wang Tested-by: Lyle Li Signed-off-by: leoliu-oc --- arch/x86/events/zhaoxin/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/zhaoxin/core.c b/arch/x86/events/zhaoxin/core.c index a608793aeefa..b6409f62ad56 100644 --- a/arch/x86/events/zhaoxin/core.c +++ b/arch/x86/events/zhaoxin/core.c @@ -642,6 +642,7 @@ __init int zhaoxin_pmu_init(void) break; case 0x5b: case 0x6b: + case 0x7b: zx_pmon_event_map[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = X86_CONFIG(.event = 0x02, .umask = 0x01, .inv = 0x01, .cmask = 0x01); @@ -657,7 +658,7 @@ __init int zhaoxin_pmu_init(void) if (boot_cpu_data.x86_model == 0x5b) pr_cont("Yongfeng events, "); - if (boot_cpu_data.x86_model == 0x6b) + if (boot_cpu_data.x86_model == 0x6b || boot_cpu_data.x86_model == 0x7b) pr_cont("Shijidadao events, "); break; -- Gitee