[Skiboot] [PATCH 02/12] xive: Fix interrupt number mangling

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Sep 6 14:51:24 AEST 2016


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 at kernel.crashing.org>
---
 hw/xive.c | 6 +++---
 1 file 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
-- 
2.7.4



More information about the Skiboot mailing list