Re: [PATCH] MIPS: PowerTV: Use fls() carefully where static optimization is required

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 03, 2010 at 11:31:44PM +0900, Shinya Kuribayashi wrote:

> On 07/03/2010 06:32 AM, David VomLehn wrote:
> > Usually it's better to control things on a feature-by-feature basis rather
> > than rely on things like CPU model. This allows you to easily handle case
> > where, for example, you have a different CPU that normally doesn't have
> > a feature but a particular variant does have it. IIRC, the MIPS family has
> > examples of this. So, I think it's better to go with the:
> > 	__builtin_constant_p(cpu_has_clo_clz) && cpu_has_clo_clz
> > used in fls().
> 
> Ok, now I've come to the same conclusion.  Revised patch will be like
> this.  Malta is a development platform supporting various types of
> MIPS32/MIPS64 cores, hence use cpu_has_clo_clz directly.  The same goes
> to MIPSSim.  
> 
> Another concern is that, I'm not really sure whether cpu_has_clo_clz is
> acceptable or not for Malta (and MIPSSim).  Hopefully Ralf will help us
> make things in the right direction.

My grief with this patch at this moment is:

 o The suggestion of using __builtin_ffs or similar is nice but these
   functions appear to have introduced in GCC 3.4 but we unfortunately
   support GCC >= 3.2.
 o no Signed-off-by: line.  So can you sen me one?  Thanks

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux