Re: [PATCH 02/19] MIPS: Add cases for CPU_I6400

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

 



On 07/09/2015 11:03 AM, Ralf Baechle wrote:
> On Thu, Jul 09, 2015 at 10:40:36AM +0100, Markos Chandras wrote:
> 
>> index d41e8e284825..abee2bfd10dc 100644
>> --- a/arch/mips/include/asm/cpu-type.h
>> +++ b/arch/mips/include/asm/cpu-type.h
>> @@ -77,6 +77,10 @@ static inline int __pure __get_cpu_type(const int cpu_type)
>>  	 */
>>  #endif
>>  
>> +#ifdef CONFIG_SYS_HAS_CPU_MIPS64_R6
>> +	case CPU_I6400:
>> +#endif
>> +
> 
> To ensure best possible optimization you may want to introduce a new
> CPU type CPU_I6400 in Kconfig then change above code segment to
> 
> #ifdef CONFIG_SYS_HAS_CPU_I6400
> 	case CPU_I6400:
> #endif
> 

Why? That function uses MIPS32_XX and MIPS64_XX in other places as well.

I don't think it's a good idea to have a Kconfig symbol for I6400. It's
just a MIPSR6 processor so we do the same thing we did for other
processors like P5600, interAptiv etc.

> __get_cpu_type is ideally meant to get folded to a constant on any
> particular platform which then will allow the compiler to discard lots
> of other code.
> 
> Of course Malta being as hetergenous as it is that's not goint help
> with Malta but it will make a noticable difference for SOCs which usually
> come only with a single supported CPU type.
> 
>   Ralf
> 
Then it's best if we use platform Kconfig symbols in that function
instead of introducing a new symbol per processor.

-- 
markos




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

  Powered by Linux