lkml.org 
[lkml]   [2023]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf/x86/zhaoxin: Add Yongfeng support
From
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.

\
 
 \ /
  Last update: 2023-03-27 01:07    [W:0.071 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site