RISC-V: hwprobe: Couple fixes found on late review
cover RISC-V: hwprobe: Couple fixes found on late review
I didn't get a chance to take a close look at "[PATCH v6 0/6] RISC-V Hardware Probing User Interface" until now. I spotted a couple issues while looking and this series collects the fixes.
Andrew Jones (2):
RISC-V: hwprobe: There can only be one first
RISC-V: hwprobe: Explicity check for -1 in vdso init
arch/riscv/kernel/sys_riscv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 1/2 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.
--- arch/riscv/kernel/sys_riscv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/riscv/kernel/sys_riscv.c +3 -1
@@ -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
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 2/2 RISC-V: hwprobe: Explicity check for -1 in vdso init
In reply to Andrew Jonesid_bitsmash is unsigned. We need to explicitly check for -1, rather than use > 0.
--- arch/riscv/kernel/sys_riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/sys_riscv.c +1 -1
@@ -282,7 +282,7 @@ static int __init init_hwprobe_vdso_data(void)* populated) or any value returns -1 (varies across CPUs), then the * vDSO should defer to the kernel for exotic cpu masks. */ - avd->homogeneous_cpus = (id_bitsmash >0 ); + avd->homogeneous_cpus = id_bitsmash !=0 && id_bitsmash !=-1 ;return 0 ; }
Signature · 7 lines
2.39.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 3 lines · Andrew Jones
I didn't get a chance to take a close look at "[PATCH v6 0/6] RISC-V Hardware Probing User Interface" until now. I spotted a couple issues while looking and this series collects the fixes.
Both seem fair..
Thanks,
Conor.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 9 lines · Andrew Jones
I didn't get a chance to take a close look at "[PATCH v6 0/6] RISC-V Hardware Probing User Interface" until now. I spotted a couple issues while looking and this series collects the fixes.
Andrew Jones (2):
RISC-V: hwprobe: There can only be one first
RISC-V: hwprobe: Explicity check for -1 in vdso init
Quoted 5 lines
arch/riscv/kernel/sys_riscv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)--
2.39.2
Sigh, wish I had spotted these. Thanks!
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
AppliedQuoted 9 lines · Andrew Jones
I didn't get a chance to take a close look at "[PATCH v6 0/6] RISC-V Hardware Probing User Interface" until now. I spotted a couple issues while looking and this series collects the fixes.
Andrew Jones (2):
RISC-V: hwprobe: There can only be one first
RISC-V: hwprobe: Explicity check for -1 in vdso init[...]
Applied, thanks!
[1/2] RISC-V: hwprobe: There can only be one first
https://git.kernel.org/palmer/c/08dc10759468 [2/2] RISC-V: hwprobe: Explicity check for -1 in vdso init https://git.kernel.org/palmer/c/b09313dd2e72
Best regards,
Signature · 7 lines
Palmer Dabbelt <[email protected]> _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv