From: Andrew Jones <ajones@ventanamicro.com>
To: linux-riscv@lists.infradead.org
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>, Evan Green <evan@rivosinc.com>
Subject: [PATCH 1/2] RISC-V: hwprobe: There can only be one first
Date: Wed, 26 Apr 2023 16:13:32 +0200 [thread overview]
Message-ID: <20230426141333.10063-2-ajones@ventanamicro.com> (raw)
In-Reply-To: <20230426141333.10063-1-ajones@ventanamicro.com>
Only capture the first cpu_id in order for the comparison
below to be of any use.
Fixes: ea3de9ce8aa2 ("RISC-V: Add a syscall for HW probing")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
---
arch/riscv/kernel/sys_riscv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index 849b4170629d..c569dac7452e 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -103,8 +103,10 @@ static void hwprobe_arch_id(struct riscv_hwprobe *pair,
break;
}
- if (first)
+ if (first) {
id = cpu_id;
+ first = false;
+ }
/*
* If there's a mismatch for the given set, return -1 in the
--
2.39.2
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-04-26 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 14:13 [PATCH 0/2] RISC-V: hwprobe: Couple fixes found on late review Andrew Jones
2023-04-26 14:13 ` Andrew Jones [this message]
2023-04-26 14:13 ` [PATCH 2/2] RISC-V: hwprobe: Explicity check for -1 in vdso init Andrew Jones
2023-04-26 15:04 ` [PATCH 0/2] RISC-V: hwprobe: Couple fixes found on late review Conor Dooley
2023-04-26 15:43 ` Evan Green
2023-04-26 16:45 ` 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=20230426141333.10063-2-ajones@ventanamicro.com \
--to=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=evan@rivosinc.com \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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