From: "Troy Mitchell" <troy@kernel.org>
To: "Peixin Xie" <peixin.xie@linux.spacemit.com>,
"Paul Walmsley" <pjw@kernel.org>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>, "Yixun Lan" <dlan@kernel.org>,
"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
"Guo Ren" <guoren@kernel.org>,
"Conor Dooley" <conor.dooley@microchip.com>,
"Charlie Jenkins" <thecharlesjenkins@gmail.com>
Cc: "Palmer Dabbelt" <palmer@rivosinc.com>,
<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<spacemit@lists.linux.dev>, <stable@vger.kernel.org>,
"linux-riscv" <linux-riscv-bounces@lists.infradead.org>,
"Troy Mitchell" <troy@kernel.org>
Subject: Re: [PATCH] riscv: cpu: Fix incorrect cached machine IDs on secondary harts
Date: Wed, 18 Nov 2026 06:50:26 +0000 [thread overview]
Message-ID: <DMY4Y1HIP3H1.9THJE8OIYQ6P@kernel.org> (raw)
In-Reply-To: <20261118-riscv-marchid-fix-v1-1-6d677fcd5461@linux.spacemit.com>
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On Wed Nov 18, 2026 at 3:04 AM GMT, Peixin Xie wrote:
> During early ISA-string parsing, the boot hart stores its mvendorid
> and marchid in riscv_cpuinfo. This happens before setup_per_cpu_areas(),
> which copies the static per-CPU data to each CPU's allocated area.
>
> When riscv_cpuinfo_starting() runs on the other harts, the copied IDs
> are already nonzero, so it skips reading their own IDs. As a result,
> secondary harts can retain the boot hart's IDs.
>
> Read mvendorid and marchid unconditionally on each hart, as already
> done for mimpid.
>
> Fixes: e482eab4d1eb ("riscv: cpufeature: Fix thead vector hwcap removal")
> Cc: stable@vger.kernel.org
> Signed-off-by: Peixin Xie <peixin.xie@linux.spacemit.com>
Reviewed-by: Troy Mitchell <troy@kernel.org>
--
Troy Mitchell
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2026-11-18 6:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 3:04 [PATCH] riscv: cpu: Fix incorrect cached machine IDs on secondary harts Peixin Xie
2026-11-18 6:50 ` Troy Mitchell [this message]
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=DMY4Y1HIP3H1.9THJE8OIYQ6P@kernel.org \
--to=troy@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor.dooley@microchip.com \
--cc=dlan@kernel.org \
--cc=guoren@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv-bounces@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
--cc=peixin.xie@linux.spacemit.com \
--cc=pjw@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=thecharlesjenkins@gmail.com \
--cc=troy.mitchell@linux.spacemit.com \
/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