[Skiboot] [PATCH 1/1] vas: export chip-id to vas platform device

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Wed Aug 30 01:33:04 AEST 2017


This is needed so VAS in the kernel can perform cpu to vas id mapping.

Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
---
 hw/vas.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/vas.c b/hw/vas.c
index b744b51..7ee668d 100644
--- a/hw/vas.c
+++ b/hw/vas.c
@@ -389,6 +389,7 @@ static struct vas *alloc_vas(uint32_t chip_id, uint32_t vas_id, uint64_t base)
 
 static void create_mm_dt_node(struct proc_chip *chip)
 {
+	int gcid;
 	struct dt_node *dn;
 	struct vas *vas;
 	uint64_t hvwc_start, hvwc_len;
@@ -397,6 +398,7 @@ static void create_mm_dt_node(struct proc_chip *chip)
 	uint64_t pbf_start, pbf_nbits;
 
 	vas = chip->vas;
+	gcid = chip->id;
 	get_hvwc_mmio_bar(chip->id, &hvwc_start, &hvwc_len);
 	get_uwc_mmio_bar(chip->id, &uwc_start, &uwc_len);
 	get_paste_bar(chip->id, &pbar_start, &pbar_len);
@@ -413,6 +415,7 @@ static void create_mm_dt_node(struct proc_chip *chip)
 					pbf_start, pbf_nbits);
 
 	dt_add_property(dn, "ibm,vas-id", &vas->vas_id, sizeof(vas->vas_id));
+	dt_add_property(dn, "ibm,chip-id", &gcid, sizeof(gcid));
 }
 
 /*
-- 
2.7.4



More information about the Skiboot mailing list