aboutsummaryrefslogtreecommitdiff
path: root/include/chip.h
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>2017-05-24 22:02:08 -0700
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-01 12:35:56 +1000
commite35f7a312fc7ad63756bf851c6e08d07dedf64b4 (patch)
tree412bfe30ecdfbb5d0752c43e8c063adab13b9565 /include/chip.h
parent81c0e076374ecf55ed8ef3c41be14ee0c7fea4ec (diff)
downloadskiboot-e35f7a312fc7ad63756bf851c6e08d07dedf64b4.zip
skiboot-e35f7a312fc7ad63756bf851c6e08d07dedf64b4.tar.gz
skiboot-e35f7a312fc7ad63756bf851c6e08d07dedf64b4.tar.bz2
Define helpers to extract P9 node/chip ids
VAS needs the node and chip ids to compute the "paste address" of a window. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/chip.h')
-rw-r--r--include/chip.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/chip.h b/include/chip.h
index e25f54d..6d227dd 100644
--- a/include/chip.h
+++ b/include/chip.h
@@ -98,6 +98,10 @@
#define P9_PIR2THREADID(pir) ((pir) & 0x3)
+#define P9_GCID2NODEID(gcid) (((gcid) >> 3) & 0xf)
+
+#define P9_GCID2CHIPID(gcid) ((gcid) & 0x7)
+
/* P9 specific ones mostly used by XIVE */
#define P9_PIR2LOCALCPU(pir) ((pir) & 0xff)
#define P9_PIRFROMLOCALCPU(chip, cpu) (((chip) << 8) | (cpu))