Messages in this thread | | | Date | Mon, 20 Mar 2023 09:35:56 +0800 | Subject | Re: [PATCH] perf/x86/zhaoxin: Add Yongfeng support | From | silviazhaooc <> |
| |
On 2023/3/16 22:59, Dave Hansen wrote: > 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
Great suggestion. After discussing with my colleagues, we decide to add these open-coded model/family numbers into a new file like zhaoxin-family.h, create a new patch set and re-commit.
| |