Skip to content

Commit 777c0d7

Browse files
Andrew Jonespalmer-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 <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202310311801.hxduISrr-lkp@intel.com/ Fixes: 9c7646d ("RISC-V: hwprobe: Expose Zicboz extension and its block size") Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20231101141908.192198-2-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 82180b1 commit 777c0d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)