[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOFt0_DKfouP0r68M8S-CQF=Fk0C7sPpV2WNm=u-wH3_1q=Pzw@mail.gmail.com>
Date: Wed, 28 Oct 2015 19:55:55 +0000
From: Alex Smith <alex@...x-smith.me.uk>
To: Leonid Yegoshin <Leonid.Yegoshin@...tec.com>
Cc: David Daney <ddaney.cavm@...il.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Markos Chandras <markos.chandras@...tec.com>,
linux-mips <linux-mips@...ux-mips.org>,
Alex Smith <alex.smith@...tec.com>,
linux-kernel@...r.kernel.org
Subject: Re: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()
On 28 October 2015 at 19:28, Leonid Yegoshin <Leonid.Yegoshin@...tec.com> wrote:
> On 10/28/2015 12:04 PM, Alex Smith wrote:
>>
>> On 28 October 2015 at 18:57, Leonid Yegoshin <Leonid.Yegoshin@...tec.com>
>> wrote:
>>>
>>>
>> As I've explained the VDSO will only use the CP0 counter in the same
>> situations that the kernel would when it is the active clocksource.
>> Any issue that makes the counter unreliable affects the kernel as well
>> and is unrelated to the VDSO, so a fix does not belong in this patch.
>
>
> What would you do if some SoC with different type of cores will define CPU1
> etc CP0_COUNT as a DIFFERENT clocksource from CPU0 (because of frequency
> etc)? Timekeeping can select CPU0 clocksource but code still uses a local
> CPU1 CP0_COUNT for gettimeofday().
Clocksources are not per-CPU. If the CP0 counter is the current
clocksource, then both the kernel and VDSO implementations of
gettimeofday will read out the CP0 counter from whatever CPU they run
on.
If in future there is some behaviour dependent on the current CPU in
the kernel gettimeofday implementation, then sure, something will need
to be done about it, but right now I see no issue that specifically
affects the VDSO code.
Alex
>
> And this kind of solution is the first in line to have an accurate timing in
> systems without GIC and with different clock frequencies.
>
> - Leonid
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists