Re: [PATCH v6 06/36] nds32: Kernel booting and initialization

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

 



On Mon, Jan 22, 2018 at 10:49 AM, Greentime Hu <green.hu@xxxxxxxxx> wrote:
> 2018-01-20 0:41 GMT+08:00 Arnd Bergmann <arnd@xxxxxxxx>:

>>> This implementation is referenced from openrisc.
>>> https://lkml.org/lkml/2017/11/17/228
>>
>> It's correct on openrisc, because that has a reliable cycle counter,
>> and that gets used in its delay function:
>>
>> void __delay(unsigned long cycles)
>> {
>>         cycles_t start = get_cycles();
>>         while ((get_cycles() - start) < cycles)
>>                 cpu_relax();
>> }
>>
>> In my review comment that you cited, I assumed that nds32 had similar
>> hardware.
>>
>> However, as you explained earlier, the nds32 architecture does not provide
>> a cycle counter and the clocksource resolution is not high enough to
>> be a good replacement, so you have to use the traditional delay
>> calibration.
>>
>
> Hi, Arnd:
>
> Thank you for your explanation.
> Will it be ok if I code it like this?
>
> config GENERIC_CALIBRATE_DELAY
>        def_bool y

Yes, I think that should be sufficient.

       Arnd



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux