Subject: RE: [PATCH] e500: Erratum cpu a005 workaround

From: Benjamin Herrenschmidt <[email-masked]>
Date: Mon, 07 Feb 2011 10:49:15 +1100

> > 
> > This isn't the way to do this.  We normally add entries in 
> > cputable.c an add a new cpu_feature_bit for the errata.
> > 
> > Than above we'd do:
> > 
> > if (cur_cpu_spec->cpu_features & CPU_FTR_E500_A005_ERRATUM)
> > 
> > 
> 
> IMHO, a cpu erratum is not a cpu feature.
> See there're only 32 bits can be used for all PowerPC platform to represent cpu feature, 
> then is it worth consuming one of them to represent one e500 erratum?

This is an interesting debate :-)

We have used cpu_features for errata in the past. However, we are
getting a bit short and I'd rather keep CPU features for things
that are spread out in multiple places and/or hitting hot code path.

If the workaround is very limited to a single non-critical code path,
testing the PVR might actually be a nicer way to do it.

Now, this specific patch is ... hrm ... hard to decide. I don't like
that much the global variable. On the other hand, it's static and allows
the whole business of this errata to be completely local to the
math_efp.c file which is a good thing.

So I'm tempted to say go with the patch as it-is, but I'll let Kumar
ultimately decide.

Cheers,
Ben.