summaryrefslogtreecommitdiff
path: root/arch/riscv/lib
diff options
context:
space:
mode:
authorAndrew Jones <ajones@ventanamicro.com>2024-01-17 14:09:34 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2024-01-17 17:46:55 -0800
commit0de65288d75ff96c30e216557d979fb9342c4323 (patch)
tree10380166d863c2625a28adeef32014189a031ea7 /arch/riscv/lib
parenta894e8ed09c6c7fa239711819db83b8c050eb7b0 (diff)
RISC-V: selftests: cbo: Ensure asm operands match constraints
The 'i' constraint expects a constant operand, which fn and its constant derivative MK_CBO(fn) are, but passing fn through a function as a parameter and using a local variable for MK_CBO(fn) allow the compiler to lose sight of that when no optimization is done. Use a macro instead of a function and skip the local variable to ensure the compiler uses constants, matching the asm constraints. Reported-by: Yunhui Cui <cuiyunhui@bytedance.com> Closes: https://lore.kernel.org/all/20240117082514.42967-1-cuiyunhui@bytedance.com Fixes: a29e2a48afe3 ("RISC-V: selftests: Add CBO tests") Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/20240117130933.57514-2-ajones@ventanamicro.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/lib')
0 files changed, 0 insertions, 0 deletions