diff mbox

[05/16] xive: Fix interrupt number mangling

Message ID 1478763292-23238-5-git-send-email-benh@kernel.crashing.org
State Superseded
Headers show

Commit Message

Benjamin Herrenschmidt Nov. 10, 2016, 7:34 a.m. UTC
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>
---
 hw/xive.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

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