]> git.karo-electronics.de Git - linux-beck.git/commitdiff
MIPS: Netlogic: Fix sign extension in PIC write
authorJayachandran C <jchandra@broadcom.com>
Mon, 10 Jun 2013 06:41:06 +0000 (06:41 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 13 Jun 2013 15:46:42 +0000 (17:46 +0200)
This does not cause a problem yet, but we do not want to write 1
to reserved bits.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5424/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/netlogic/xlp-hal/pic.h

index a981f4681a154a53fb6fed0bffc788be83ed24a3..4b5108dfaa16ade2de259fab7c65e4cae9d05140 100644 (file)
@@ -315,7 +315,7 @@ nlm_pic_send_ipi(uint64_t base, int hwt, int irq, int nmi)
 {
        uint64_t ipi;
 
-       ipi = (nmi << 31) | (irq << 20);
+       ipi = ((uint64_t)nmi << 31) | (irq << 20);
        ipi |= ((hwt >> 4) << 16) | (1 << (hwt & 0xf)); /* cpuset and mask */
        nlm_write_pic_reg(base, PIC_IPI_CTL, ipi);
 }