linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: Inochi Amaoto <inochiama@outlook.com>,
	Peter Zijlstra <peterz@infradead.org>,
	 Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,  Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Nikita Shubin <n.shubin@yadro.com>,
	linux-kernel@vger.kernel.org,  linux-perf-users@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH V3] perf vendor events riscv: add T-HEAD C9xx JSON file
Date: Mon, 26 Jun 2023 16:14:45 -0700	[thread overview]
Message-ID: <CAM9d7cjHndHrcH95uwmYRMRpm-a0kX2BHQ1jzmyo6f48w69jbg@mail.gmail.com> (raw)
In-Reply-To: <20230624-supermom-disparity-37546ffed0a4@spud>

Hello,

On Sat, Jun 24, 2023 at 1:54 AM Conor Dooley <conor@kernel.org> wrote:
>
> On Fri, Jun 23, 2023 at 09:35:01PM -0700, Namhyung Kim wrote:
> > On Fri, Jun 23, 2023 at 6:33 PM Inochi Amaoto <inochiama@outlook.com> wrote:
>
> > >
> > > As for c9xx wildcard, the T-HEAD provides a `MCPUID` vendor CSR to allow
> > > its CKLINK to get the detail CPU info. The format of this CSR are:
> > >
> > > ------------------------------------------------
> > > |31   28|27  26|25    22|21   18|17    8|7    0|
> > > | index | WLRL | family | class | model | WLRL |
> > > ------------------------------------------------
> > >
> > > And for C9xx series (only index 0000 is vaild for us, as `MCPUID` also
> > > provides other index).
> > >
> > > | 0000 | xx | 0100 | class | xxxxxxxxxx | xxxxxxxx |
> > >
> > > The class codes are:
> > >
> > > C910: 0011
> > > c906: 0100
> > >
> > > The CSR is a M-mode only CSR, so now I'm exploring a clean way to
> > > integrate this CSR into the kernel. Any advice?
>
> See for example how riscv_cpuinfo_starting() reads mvendorid & Co.
>
> > I don't know about the details.  Is this CSR available from user space?
> > If not, you could add it somewhere in the sysfs.
>
> Machine mode is the highest privilege level, Supervisor mode is next &
> User mode is the lowest. Typically the kernel runs in Supervisor mode.

Maybe you're interested in this thread for user visible identifiers.

https://lore.kernel.org/all/1687245156-61215-1-git-send-email-renyu.zj@linux.alibaba.com/

Thanks,
Namhyung

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-06-26 23:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17  7:12 [PATCH V3] perf vendor events riscv: add T-HEAD C9xx JSON file Inochi Amaoto
2023-05-18 12:09 ` Nikita Shubin
2023-05-18  9:48   ` Inochi Amaoto
2023-06-24  0:17     ` Namhyung Kim
2023-06-24  1:32       ` Inochi Amaoto
2023-06-24  4:35         ` Namhyung Kim
2023-06-24  6:42           ` Inochi Amaoto
2023-06-24  8:54           ` Conor Dooley
2023-06-26 23:14             ` Namhyung Kim [this message]
2023-06-27  8:40   ` Atish Patra
2023-06-27 11:51     ` Nikita Shubin
2023-06-22  0:11 ` Palmer Dabbelt

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=CAM9d7cjHndHrcH95uwmYRMRpm-a0kX2BHQ1jzmyo6f48w69jbg@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor@kernel.org \
    --cc=inochiama@outlook.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=n.shubin@yadro.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).