[Skiboot] [PATCH V3 1/2] prd: Fix PRD scoms for P9

Ananth N Mavinakayanahalli ananth at linux.vnet.ibm.com
Mon Mar 13 15:18:01 AEDT 2017


On Sat, Mar 11, 2017 at 11:02:33PM +0530, Vasant Hegde wrote:
> On 02/24/2017 04:00 PM, Ananth N Mavinakayanahalli wrote:

...

> >+static void prd_init_scoms(void)
> >+{
> >+	if (proc_gen == proc_gen_p8) {
> >+		prd_ipoll_mask_reg = PRD_P8_IPOLL_REG_MASK;
> >+		prd_ipoll_status_reg = PRD_P8_IPOLL_REG_STATUS;
> >+		prd_ipoll_mask = PRD_P8_IPOLL_MASK;
> >+	} else if (proc_gen == proc_gen_p9) {
> >+		prd_ipoll_mask_reg = PRD_P9_IPOLL_REG_MASK;
> >+		prd_ipoll_status_reg = PRD_P9_IPOLL_REG_STATUS;
> >+		prd_ipoll_mask = PRD_P9_IPOLL_MASK;
> >+	}
> 
> This works for now ... but if  proc_gen doesn't match then we are in trouble.
> May be  its good to add return value and abort prd_init if we don't
> find appropriate proc_gen.

I don't think this will ever get called for pre-P8 platforms. By that
yardstick, there is a lot of code (OCC, etc)., where we assume P8+
generation processors running OPAL. So, this should be ok.

Ananth



More information about the Skiboot mailing list