smccc: fix sign bit expansion
authorVolodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Tue, 5 Jan 2021 20:03:11 +0000 (20:03 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 27 Jan 2021 21:58:57 +0000 (16:58 -0500)
commitb7cfe32e186d453001a12ee0ee2c85d08a0ecd53
tree075ffa4c6f809908aac1d46fca68baeb6ba3429a
parent4d145f26dd06d9de0c2da3ff2c1f8be1ac9dbd2b
smccc: fix sign bit expansion

Signed ARM_SMCCC_FAST_CALL value is shifted to 31'st bit. Then, it is expanded
to 64 bit value, which results in 1s in higher 32 bits.

This causes corrupted values in 64-bit SMC IDs and issues in buggy handlers of
32-bit calls.

We need to make ARM_SMCCC_FAST_CALL unsigned long, so it would work properly
on 32 bit architectures.

Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
include/linux/arm-smccc.h