[PATCH 1/4 V2] powerpc/85xx: Add support for 85xx cpu type detection

Scott Wood scottwood at freescale.com
Fri Jul 12 00:15:17 EST 2013


On 07/11/2013 03:43:35 AM, David Laight wrote:
> > > +#define IS_SVR_REV(svr, maj, min) \
> > > +	((SVR_MAJ(svr) == (maj)) && (SVR_MIN(svr) == (min)))
> >
> > I don't think IS_SVR_REV is needed.  Callers can just do "if
> > (SVR_REV(svr) == 0x30)" or whatever, especially since we're relying  
> on
> > them to do this for greater/less than comparisons.
> 
> Not only that, I'd guess that 'maj' and 'min' are likely to be
> constants - so you'd want to combine them and compare against 'svr'
> rather than have two conditionals.

Yes, that's what I meant -- 0x30 would represent revision 3.0.

-Scott


More information about the Linuxppc-dev mailing list