aboutsummaryrefslogtreecommitdiff
path: root/hw/xive.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-11-14 13:06:06 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-11-15 15:06:00 +1100
commitfaaf3f87ad818997ecc91f80ac9dc3d3e5889a58 (patch)
tree9045db978a8ab74ce5fd7a5e482c425f08e16a92 /hw/xive.c
parent29d181229281df5b628c7ebdbe00bd1dc0ac53b9 (diff)
downloadskiboot-faaf3f87ad818997ecc91f80ac9dc3d3e5889a58.zip
skiboot-faaf3f87ad818997ecc91f80ac9dc3d3e5889a58.tar.gz
skiboot-faaf3f87ad818997ecc91f80ac9dc3d3e5889a58.tar.bz2
xive: Fix interrupt number mangling
The comment and implementation didn't match, we were putting the block_id in the part of the field reserved for the CPPR. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/xive.c')
-rw-r--r--hw/xive.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xive.c b/hw/xive.c
index dcd8d5b..3c25cae 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -349,9 +349,9 @@ struct xive {
* reserved for the CPPR value.
*
*/
-#define GIRQ_TO_BLK(__g) (((__g) >> 24) & 0xf)
-#define GIRQ_TO_IDX(__g) ((__g) & 0x00ffffff)
-#define BLKIDX_TO_GIRQ(__b,__i) (((uint32_t)(__b)) << 24 | (__i))
+#define GIRQ_TO_BLK(__g) (((__g) >> 20) & 0xf)
+#define GIRQ_TO_IDX(__g) ((__g) & 0x000fffff)
+#define BLKIDX_TO_GIRQ(__b,__i) (((uint32_t)(__b)) << 20 | (__i))
/* VP IDs are just the concatenation of the BLK and index as found
* in an EQ target field for example