diff options
author | Michael Clark <[email protected]> | 2019-02-11 17:38:29 +1300 |
---|---|---|
committer | Paul Burton <[email protected]> | 2019-02-11 12:02:08 -0800 |
commit | 94ee12b507db8b5876e31c9d6c9d84f556a4b49f (patch) | |
tree | 66e5bc74fdb473319506f7ea63319d85fb3608a2 /scripts/gen_compile_commands.py | |
parent | d13937116f1e82bf508a6325111b322c30c85eb9 (diff) |
MIPS: fix truncation in __cmpxchg_small for short values
__cmpxchg_small erroneously uses u8 for load comparison which can
be either char or short. This patch changes the local variable to
u32 which is sufficiently sized, as the loaded value is already
masked and shifted appropriately. Using an integer size avoids
any unnecessary canonicalization from use of non native widths.
This patch is part of a series that adapts the MIPS small word
atomics code for xchg and cmpxchg on short and char to RISC-V.
Cc: RISC-V Patches <[email protected]>
Cc: Linux RISC-V <[email protected]>
Cc: Linux MIPS <[email protected]>
Signed-off-by: Michael Clark <[email protected]>
[[email protected]:
- Fix varialble typo per Jonas Gorski.
- Consolidate load variable with other declarations.]
Signed-off-by: Paul Burton <[email protected]>
Fixes: 3ba7f44d2b19 ("MIPS: cmpxchg: Implement 1 byte & 2 byte cmpxchg()")
Cc: [email protected] # v4.13+
Diffstat (limited to 'scripts/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions