[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877c4i2wak.ffs@tglx>
Date: Fri, 21 Mar 2025 17:17:07 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: John Stultz <jstultz@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Stephen Boyd <sboyd@...nel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker
<frederic@...nel.org>, Shuah Khan <shuah@...nel.org>, Miroslav Lichvar
<mlichvar@...hat.com>, linux-kselftest@...r.kernel.org,
kernel-team@...roid.com, Lei Chen <lei.chen@...rtx.com>
Subject: Re: [RFC PATCH 1/2] time/timekeeping: Fix possible inconsistencies
in _COARSE clockids
On Thu, Mar 20 2025 at 19:01, John Stultz wrote:
> On Sun, Mar 16, 2025 at 9:56 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>> #define TK_CLEAR_NTP (1 << 0)
>> #define TK_CLOCK_WAS_SET (1 << 1)
>>
>> So it clears NTP instead. Not really what you want either. :)
>
> Hey Thomas,
> Sorry for the slow reply here. So I agree with you that we don't
> want to set clock_set above, that was my mistake. But this last bit I
> don't think is right, as timekeeping advance() just returns a bool
> (return !!clock_set;), which is used to decide to call clock_was_set()
> or not - not the argument passed to clock_was_set().
timekeeping_advance() also uses the clock_set internally.
clock_set |= ....
timekeeping_update_from_shadow(..., clock_set);
timekeeping_update_from_shadow() evaluates the TK... bits.
Thanks,
tglx
Powered by blists - more mailing lists