[Skiboot] [PATCH v12 09/10] skiboot: Add core IMC related counter configuration
Michael Neuling
mikey at neuling.org
Wed Jun 14 15:16:55 AEST 2017
> > diff --git a/include/opal-api.h b/include/opal-api.h
> > index 02927356d033..5dbae2d57fde 100644
> > --- a/include/opal-api.h
> > +++ b/include/opal-api.h
> > @@ -1232,6 +1232,7 @@ enum {
> > /* Operation argument to IMC Microcode */
> > enum {
> > > OPAL_IMC_COUNTERS_NEST = 1,
> >
> > + OPAL_IMC_COUNTERS_CORE = 2,
>
> How do we advertise to linux that it can do CORE vs NEST calls?
>
> Say we need to remove one, how does linux know which one it can call without
> trying and getting OPAL_PARAMETER?
>
> If it's based on the device tree, then the patch series the wrong way around
> since the earlier patches start adding the device tree before the calls are
> added. So if you apply just patches 1-7, Linux is going to blow up with a
> bunch
> of OPAL_PARAMETER since it'll start seeing the device tree before the OPAL
> calls
> have been added.
>
> Not a big issues for this series, but it does make me wonder. If someone
> updates the device tree in the PNOR to start adding a new section type for
> IMC,
> how do we tell linux that even though the device tree supports it, OPAL itself
> doesn't?
>
> Say we have PHB counters in the future (just made up). We add them to the IMA
> catalog and linux, but not skiboot. Linux is going to OPAL_PARAMETER and blow
> up. Linux needs to check if the device tree and skiboot have the capability.
> Not just the device tree.
Talking to benh offline, he suggested skiboot should parse the devicetree
imported from the PNOR and strip out things it doesn't understand.
That way Linux won't try to touch things it doesn't understand.
Mikey
More information about the Skiboot
mailing list