From: Steven J. Hill Date: Mon, 25 Mar 2013 17:07:40 +0000 (-0500) Subject: MIPS: microMIPS: Fix incorrect mask for jump immediate. X-Git-Tag: v3.10-rc1~15^2^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fe4bb98e42945ddf2c0d47cec647ef76909e812;p=platform%2Fkernel%2Flinux-3.10.git MIPS: microMIPS: Fix incorrect mask for jump immediate. Jump or branch target addresses have the first bit set. The original mask did not take this into account and will cause a field overflow warning for the target address when a jump immediate instruction is built. Signed-off-by: Steven J. Hill --- diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c index 476d50c..162ee6d 100644 --- a/arch/mips/mm/uasm-micromips.c +++ b/arch/mips/mm/uasm-micromips.c @@ -130,7 +130,8 @@ static inline __uasminit u32 build_bimm(s32 arg) static inline __uasminit u32 build_jimm(u32 arg) { - WARN(arg & ~(JIMM_MASK << 2), + + WARN(arg & ~((JIMM_MASK << 2) | 1), KERN_WARNING "Micro-assembler field overflow\n"); return (arg >> 1) & JIMM_MASK;