Re: [PATCH V2 12/12] MIPS: Loongson: Make CPUFreq usable for Loongson-3

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

 



Hi, Ralf,

Loops_per_jiffy is set on startup and doesn't change later. It reflect
the maximum value frequency, but for CPU hotplug, a new online CPU may
not run at the maximum frequency (remain the old value before it is
offline).

Huacai

On Tue, Nov 11, 2014 at 6:57 PM, Ralf Baechle <ralf@xxxxxxxxxxxxxx> wrote:
> On Tue, Nov 04, 2014 at 02:18:48PM +0800, Huacai Chen wrote:
>
>> diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
>> index c94c4e9..01d676a 100644
>> --- a/arch/mips/kernel/smp.c
>> +++ b/arch/mips/kernel/smp.c
>> @@ -136,7 +136,8 @@ asmlinkage void start_secondary(void)
>>       calibrate_delay();
>>       preempt_disable();
>>       cpu = smp_processor_id();
>> -     cpu_data[cpu].udelay_val = loops_per_jiffy;
>> +     if (!cpu_data[cpu].udelay_val)
>> +             cpu_data[cpu].udelay_val = loops_per_jiffy;
>
> Why this?  Is the idea that the value of loops_per_jiffy which was set
> on bootup may no longer match the actual clock frequency?
>
>   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