Message ID | 148789734198.3828.8266723369226905966.stgit@thinktux.in.ibm.com |
---|---|
State | Superseded |
Headers | show |
On 02/24/2017 06:19 AM, Ananth N Mavinakayanahalli wrote: > ... since PRD runs in host userspace for FSP based P9 systems. > > Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> > --- > hw/prd.c | 16 +++++++++------- > platforms/ibm-fsp/zz.c | 3 +++ > 2 files changed, 12 insertions(+), 7 deletions(-) > > diff --git a/hw/prd.c b/hw/prd.c > index a44faa9..d63c03f 100644 > --- a/hw/prd.c > +++ b/hw/prd.c > @@ -361,13 +361,15 @@ void prd_init(void) > } > unlock(&ipoll_lock); > > - if (fsp_present()) { > - /* todo: FSP implementation */ > - queue_prd_msg = queue_prd_msg_nop; > - } else { > - queue_prd_msg = queue_prd_msg_hbrt; > - opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); > - } > + /* > + * P9 FSP based systems work similar to the OpenPOWER > + * ones in that the PRD runs in host userspace. On such > + * systems, prd_init() gets called from the platform > + * probe callback and the setup for them is similar > + * to the OpenPOWER systems. > + */ > + queue_prd_msg = queue_prd_msg_hbrt; > + opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); > > prd_node = dt_new(opal_node, "diagnostics"); > dt_add_property_strings(prd_node, "compatible", "ibm,opal-prd"); > diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c > index 89d87b4..4d50799 100644 > --- a/platforms/ibm-fsp/zz.c > +++ b/platforms/ibm-fsp/zz.c > @@ -29,6 +29,9 @@ > > static bool zz_probe(void) > { > + /* PRD runs in host userspace on P9 FSP platforms */ > + prd_init(); > + > /* FIXME: make this neater when the dust settles */ > if (dt_node_is_compatible(dt_root, "ibm,zz-1s2u") || > dt_node_is_compatible(dt_root, "ibm,zz-1s4u") || > > _______________________________________________ > Skiboot mailing list > Skiboot@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/skiboot >
On Fri, 2017-02-24 at 06:19 +0530, Ananth N Mavinakayanahalli wrote: > - if (fsp_present()) { > - /* todo: FSP implementation */ > - queue_prd_msg = queue_prd_msg_nop; > - } else { > - queue_prd_msg = queue_prd_msg_hbrt; > - opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); > - } > + /* > + * P9 FSP based systems work similar to the OpenPOWER > + * ones in that the PRD runs in host userspace. On such > + * systems, prd_init() gets called from the platform > + * probe callback and the setup for them is similar > + * to the OpenPOWER systems. > + */ > + queue_prd_msg = queue_prd_msg_hbrt; > + opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); > What about the P8 FSP case ? Cheers, Ben.
On Fri, Feb 24, 2017 at 07:45:20PM +1100, Benjamin Herrenschmidt wrote: > On Fri, 2017-02-24 at 06:19 +0530, Ananth N Mavinakayanahalli wrote: > > - if (fsp_present()) { > > - /* todo: FSP implementation */ > > - queue_prd_msg = queue_prd_msg_nop; > > - } else { > > - queue_prd_msg = queue_prd_msg_hbrt; > > - opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); > > - } > > + /* > > + * P9 FSP based systems work similar to the OpenPOWER > > + * ones in that the PRD runs in host userspace. On such > > + * systems, prd_init() gets called from the platform > > + * probe callback and the setup for them is similar > > + * to the OpenPOWER systems. > > + */ > > + queue_prd_msg = queue_prd_msg_hbrt; > > + opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); > > > > What about the P8 FSP case ? We never get here since prd_init() doesn't get called. For the P9 case, I am calling prd_init() from platform->probe(). In fact, more changes are needed since the IPOLL SCOM addresses have changed in P9. Patches coming for that... Ananth
diff --git a/hw/prd.c b/hw/prd.c index a44faa9..d63c03f 100644 --- a/hw/prd.c +++ b/hw/prd.c @@ -361,13 +361,15 @@ void prd_init(void) } unlock(&ipoll_lock); - if (fsp_present()) { - /* todo: FSP implementation */ - queue_prd_msg = queue_prd_msg_nop; - } else { - queue_prd_msg = queue_prd_msg_hbrt; - opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); - } + /* + * P9 FSP based systems work similar to the OpenPOWER + * ones in that the PRD runs in host userspace. On such + * systems, prd_init() gets called from the platform + * probe callback and the setup for them is similar + * to the OpenPOWER systems. + */ + queue_prd_msg = queue_prd_msg_hbrt; + opal_register(OPAL_PRD_MSG, opal_prd_msg, 1); prd_node = dt_new(opal_node, "diagnostics"); dt_add_property_strings(prd_node, "compatible", "ibm,opal-prd"); diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c index 89d87b4..4d50799 100644 --- a/platforms/ibm-fsp/zz.c +++ b/platforms/ibm-fsp/zz.c @@ -29,6 +29,9 @@ static bool zz_probe(void) { + /* PRD runs in host userspace on P9 FSP platforms */ + prd_init(); + /* FIXME: make this neater when the dust settles */ if (dt_node_is_compatible(dt_root, "ibm,zz-1s2u") || dt_node_is_compatible(dt_root, "ibm,zz-1s4u") ||
... since PRD runs in host userspace for FSP based P9 systems. Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> --- hw/prd.c | 16 +++++++++------- platforms/ibm-fsp/zz.c | 3 +++ 2 files changed, 12 insertions(+), 7 deletions(-)