On Wed, Dec 11, 2019 at 04:13:23PM +0100, Christian Ehrhardt wrote:
> That means the first switch_interrupts call from RTC_Initialise ->
> RTC_Linux_Initialise -> switch_interrupts has on_off=0 and that doesn't
> trigger the issue at initialization phase.
> Later on on RTC_TimeInit -> switch_interrupts argument on_off=1 and the
> issue occurs.
> Turns out our "problematic" RTCs only trigger the issue on on_off=1.

Interesting. When I added that code I checked the kernel source code
and it looked like enabling and disabling the interrupt should both
return the same error.

What RTC driver is used on the machine?

>    /* Make sure the RTC supports interrupts */
> -  if (!switch_interrupts(0)) {
> +  if (!switch_interrupts(1) || switch_interrupts(0)) {
>      close(fd);
>      return 0;
>    }

I'd prefer this approach, but I think there is a missing "!" before
the second call of switch_interrupts().

> I've understood that you wanted it to hard-fail and bail out of -s was set
> but RTC init failed right?

No, it should continue to run (using other time sources as configured).

-- 
Miroslav Lichvar


--
To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" 
in the subject.
For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the 
subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.

Reply via email to