diff options
author | Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> | 2021-01-05 23:03:11 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-28 00:58:57 +0300 |
commit | b7cfe32e186d453001a12ee0ee2c85d08a0ecd53 (patch) | |
tree | 075ffa4c6f809908aac1d46fca68baeb6ba3429a /include/linux | |
parent | 4d145f26dd06d9de0c2da3ff2c1f8be1ac9dbd2b (diff) | |
download | u-boot-b7cfe32e186d453001a12ee0ee2c85d08a0ecd53.tar.xz |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/arm-smccc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 2d1e6cc156..7f2be23394 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -11,8 +11,8 @@ * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html */ -#define ARM_SMCCC_STD_CALL 0 -#define ARM_SMCCC_FAST_CALL 1 +#define ARM_SMCCC_STD_CALL 0UL +#define ARM_SMCCC_FAST_CALL 1UL #define ARM_SMCCC_TYPE_SHIFT 31 #define ARM_SMCCC_SMC_32 0 |