Re: [PATCH v1 4/6] pps: generators: Add PPS Generator TIO Driver

From
Thomas Gleixner <hidden>
Date
2023-10-17 22:58:41
Also in
lkml
Reply to
Thomas Gleixner, 2023-10-17
On Tue, Oct 17 2023 at 18:27, Thomas Gleixner wrote:
static bool pps_arm_next_pulse(struct pps_tio *tio, ktime_t expires)
{
	u64 art;

	if (!ktime_real_to_base_clock(expires, CSID_X86_ART, &art))
        	return false;

	pps_compv_write(tio, art - ART_HW_DELAY_CYCLES);
        return true;
}

ktime_real_to_base_clock() does not exist, but that's the function you
really want to have.
It just occured to me that CLOCK_REALTIME might not really the best
clock to base this on.

It's obvious why this can't be based on CLOCK_MONOTONIC, but I rather
would base this on CLOCK_TAI which at least does not have the issue of
leap seconds and the related nightmares.

Thanks,

        tglx
Thread (16 messages) 16 messages, 3 authors, last reply 2023-12-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help