Skip to content

Commit 777c0d7

Browse files
jones-drewpalmer-dabbelt
authored andcommitted
RISC-V: hwprobe: Always use u64 for extension bits
Extensions are getting added quickly and their hwprobe bits will soon exceed 31 (which pair values accommodate, since they're of type u64). However, in one tree, where a bunch of extensions got merged prior to zicboz, zicboz already got pushed to bit 32. Pushing it exposed a 32-bit compilation bug, since unsigned long was used instead of u64. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 9c7646d ("RISC-V: hwprobe: Expose Zicboz extension and its block size") Signed-off-by: Andrew Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 82180b1 commit 777c0d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/sys_riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
169169
pair->value &= ~missing;
170170
}
171171

172-
static bool hwprobe_ext0_has(const struct cpumask *cpus, unsigned long ext)
172+
static bool hwprobe_ext0_has(const struct cpumask *cpus, u64 ext)
173173
{
174174
struct riscv_hwprobe pair;
175175

0 commit comments

Comments
 (0)