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

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


Michael Neuling [mikey at neuling.org] wrote:
> On Tue, 2017-08-29 at 08:33 -0700, Sukadev Bhattiprolu wrote:
> > This is needed so VAS in the kernel can perform cpu to vas id mapping.
> 
> cpu to vas, or chip to vas?

Yes, there is cpu_to_chip() mapping in the kernel which I am thinking of
using to map a procees's cpu to chip to vas id. So, yes, for this patch,
we should say chip to vas id.
> 
> Mikey
> 
> > 
> > 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));
> >  }
> > 
> >  /*



More information about the Skiboot mailing list