mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: silviazhao <silviazhao-oc@zhaoxin.com>,
	peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@kernel.org, namhyung@kernel.org, irogers@google.com,
	adrian.hunter@intel.com, tglx@linutronix.de, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: cobechen@zhaoxin.com, louisqi@zhaoxin.com,
	silviazhao@zhaoxin.com, cooperyan@zhaoxin.com
Subject: Re: [PATCH] perf/x86/zhaoxin: Add Yongfeng support
Date: Thu, 16 Mar 2023 07:59:56 -0700	[thread overview]
Message-ID: <6f78ecfb-99c8-eee3-cad0-69bbd88a107c@intel.com> (raw)
In-Reply-To: <20230316021647.771-1-silviazhao-oc@zhaoxin.com>

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

  reply	other threads:[~2023-03-16 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  2:16 silviazhao
2023-03-16 14:59 ` Dave Hansen [this message]
2023-03-20  1:35   ` silviazhaooc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f78ecfb-99c8-eee3-cad0-69bbd88a107c@intel.com \
    --to=dave.hansen@intel.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=cobechen@zhaoxin.com \
    --cc=cooperyan@zhaoxin.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=louisqi@zhaoxin.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=silviazhao-oc@zhaoxin.com \
    --cc=silviazhao@zhaoxin.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®