mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
RISC-V: hwprobe: There can only be one first
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> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Evan Green <evan@rivosinc.com> Link: https://lore.kernel.org/r/20230426141333.10063-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
26e7aacb83
commit
08dc107594
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user