diff options
author | Nathan Huckleberry <nhuck@google.com> | 2020-06-11 21:32:35 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-06-12 22:07:58 +0300 |
commit | 6c58f25e6938c073198af8b1e1832f83f8f0df33 (patch) | |
tree | ad1a12757a095c0ca949f651a2531389cbda4cb0 /kernel/latencytop.c | |
parent | cd16ed33c3c618930ccda7049dcea05ee707a9c0 (diff) | |
download | linux-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/latencytop.c')
0 files changed, 0 insertions, 0 deletions