Re: [PATCH 3/3] MIPS: fix truncation in __cmpxchg_small for short values

Paul Burton <[email protected]> Mon, 11 Feb 2019 20:03:22 +0000
Newsgroups gmane.linux.ports.riscv,gmane.linux.ports.mips.general,gmane.linux.ports.mips
Message-ID <MWHPR2201MB12772F5893AA8BEF53CB27F1C1640@MWHPR2201MB1277.namprd22.prod.outlook.com>
Hello,

Michael Clark wrote:
> __cmpxchg_small erroneously uses u8 for load comparison which can
> be either char or short. This patch changes the local varialble 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]>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email [email protected] to report it. ]