[Skiboot] [PATCH V2] occ: irq: Fix SCOM address and irq reasons for OCC_MISC register

Vaidyanathan Srinivasan svaidy at linux.vnet.ibm.com
Fri Apr 7 15:59:57 AEST 2017


* Stewart Smith <stewart at linux.vnet.ibm.com> [2017-04-07 11:14:16]:

> Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com> writes:
> >  void occ_send_dummy_interrupt(void)
> >  {
> >  	struct psi *psi;
> >  	struct proc_chip *chip = get_chip(this_cpu()->chip_id);
> >  
> >  	/* Emulators and P7 doesn't do this */
> > -	if (proc_gen != proc_gen_p8 || chip_quirk(QUIRK_NO_OCC_IRQ))
> > +	if (proc_gen != proc_gen_p8 ||  proc_gen != proc_gen_p9 ||
> > +	    chip_quirk(QUIRK_NO_OCC_IRQ))
> >  		return;
> 
> Won't this always evaluate to true?

Yes :(

Should have been 
        if ((proc_gen != proc_gen_p8 && proc_gen != proc_gen_p9) ||
                chip_quirk(QUIRK_NO_OCC_IRQ))

> on p9:
> not p8 (true) or not p9 (false) or quirk (false) = true
> on p8:
> not p8 (false) or not p9 (true) or quirk (false) = true
> 
> proc_gen < p8 would work.

Yes, but we mostly boot old code in new hardware first, so how about:
        if (proc_gen < proc_gen_p8 || proc_gen > proc_gen_p9 ||
                        chip_quirk(QUIRK_NO_OCC_IRQ))

> (in future, when we have a new chip that doesn't have OCC_IRQ working
> yet, we could always just add in the quirk)

After adding support in future platform we can just bump the proc_gen_p9

--Vaidy



More information about the Skiboot mailing list