]> git.hungrycats.org Git - linux/commitdiff
irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 2 Jun 2016 08:00:28 +0000 (09:00 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 20 Jun 2016 03:47:43 +0000 (23:47 -0400)
[ Upstream commit dd5f1b049dc139876801db3cdd0f20d21fd428cc ]

The INTID mask is wrong, and is made a signed value, which has
nteresting effects in the KVM emulation. Let's sanitize it.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
include/linux/irqchip/arm-gic-v3.h

index f53d36d8f01ecc73322d4f31b31d781c2d9de34b..e93d2c5549dbebe784146649c951dc8360aff352 100644 (file)
 #define ICC_SGI1R_AFFINITY_1_SHIFT     16
 #define ICC_SGI1R_AFFINITY_1_MASK      (0xff << ICC_SGI1R_AFFINITY_1_SHIFT)
 #define ICC_SGI1R_SGI_ID_SHIFT         24
-#define ICC_SGI1R_SGI_ID_MASK          (0xff << ICC_SGI1R_SGI_ID_SHIFT)
+#define ICC_SGI1R_SGI_ID_MASK          (0xfULL << ICC_SGI1R_SGI_ID_SHIFT)
 #define ICC_SGI1R_AFFINITY_2_SHIFT     32
 #define ICC_SGI1R_AFFINITY_2_MASK      (0xffULL << ICC_SGI1R_AFFINITY_1_SHIFT)
 #define ICC_SGI1R_IRQ_ROUTING_MODE_BIT 40