Re: [PATCH] perf/x86/zhaoxin: Add Yongfeng support

From: Dave Hansen
Date: Thu Mar 16 2023 - 11:00:00 EST


On 3/15/23 19:16, silviazhao wrote:
> + case 0x5b:
> + zx_pmon_event_map[PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] =
> + X86_CONFIG(.event = 0x02, .umask = 0x01, .inv = 0x01,
> + .cmask = 0x01);

On the Intel side of x86/ land, we used to have these open-coded
model/family numbers scattered about. But, a few years ago, we started
populating arch/x86/include/asm/intel-family.h and using those instead.
I think it's been pretty successful. It's a lot easier to grep for
INTEL_FAM6_NEHALEM_EX than for 0x2E.

Is there a chance we could start doing the same for other CPU vendors?
Perhaps start with:

#define ZHAOXIN_FAMILY_YONGFENG 0x5B