summaryrefslogtreecommitdiff
path: root/kernel/ucount.c
diff options
context:
space:
mode:
authorNathan Huckleberry <nhuck@google.com>2020-06-11 21:32:35 +0300
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-06-12 22:07:58 +0300
commit6c58f25e6938c073198af8b1e1832f83f8f0df33 (patch)
treead1a12757a095c0ca949f651a2531389cbda4cb0 /kernel/ucount.c
parentcd16ed33c3c618930ccda7049dcea05ee707a9c0 (diff)
downloadlinux-6c58f25e6938c073198af8b1e1832f83f8f0df33.tar.xz
riscv/atomic: Fix sign extension for RV64I
The argument passed to cmpxchg is not guaranteed to be sign extended, but lr.w sign extends on RV64I. This makes cmpxchg fail on clang built kernels when __old is negative. To fix this, we just cast __old to long which sign extends on RV64I. With this fix, clang built RISC-V kernels now boot. Link: https://github.com/ClangBuiltLinux/linux/issues/867 Signed-off-by: Nathan Huckleberry <nhuck@google.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'kernel/ucount.c')
0 files changed, 0 insertions, 0 deletions