[chrony-dev] [Git][chrony/chrony][master] 9 commits: test: extend socket unit test

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


Title: GitLab

Miroslav Lichvar pushed to branch master at chrony / chrony

Commits:

  • e30d5a6e
    by Miroslav Lichvar at 2024-12-04T12:06:29+01:00
    test: extend socket unit test
    
  • 8c24086c
    by Miroslav Lichvar at 2024-12-04T12:08:57+01:00
    test: pass make options in features compilation test
    
  • 13db3d69
    by Ahmad Fatoum at 2024-12-04T12:09:03+01:00
    rtc: let t_from_rtc/rtc_from_t operate on struct rtc_time directly
    
    Both functions operate on struct tm even though the struct tm is only
    used as intermediary format from struct rtc_time.
    
    In the case of rtc_from_t, the code to convert from struct tm to struct
    rtc is even duplicated.
    
    Let's simplify code a bit by moving the struct translation code into
    these conversion functions.
    
  • 68301238
    by Ahmad Fatoum at 2024-12-04T12:09:03+01:00
    rtc: pass info whether RTC is on UTC as a function parameter
    
    rtc_from_t() and t_from_rtc() call either gmtime or localtime depending
    on the value of a global rtc_on_utc variable.
    
    This will not be appropriate anymore when we start exporting functions
    that call rtc_from_t() and t_from_rtc() for use outside of rtc_linux.c
    as the rtc_on_utc variable may not have been initialized yet or at all.
    
    Therefore make whether the RTC is on UTC a function parameter of these
    functions, so the value can be propagated from the callers.
    
  • 8028984f
    by Ahmad Fatoum at 2024-12-04T14:51:25+01:00
    rtc: export RTC_Linux_{SwitchInterrupt,CheckInterrupt}
    
    We have code to enable and disable the RTC's UIE interrupt, as well as
    check whether it occurred and skip the first interrupt as it may be
    bogus.
    This is currently used as part of maintaining the correction file.
    
    In a later commit, we will need the same functionality for using the RTC
    as reference clock, so export the functions and give them descriptive
    names appropriate for globally visible functions.
    
  • 924199ef
    by Ahmad Fatoum at 2024-12-04T14:54:04+01:00
    rtc: factor out RTC_Linux_ReadTimeAfterInterrupt
    
    We have code to read time after an RTC's UIE interrupt, which we
    currently use as part of maintaining the correction file.
    
    In a later commit, we will need the same functionality for using the RTC
    as reference clock, so export the function and give it a descriptive
    name appropriate for a globally visible function.
    
  • a1191f83
    by Ahmad Fatoum at 2024-12-04T15:24:48+01:00
    rtc: factor out RTC_Linux_ReadTimeNow
    
    We have code to read RTC time and handle the error associated with
    having no UIE interrupt, which we currently use as part of maintaining
    the correction file.
    
    In a later commit, we will need the same functionality for using the RTC
    as reference clock, so export the function and give it a descriptive
    name appropriate for a globally visible function.
    
  • 65be9d9a
    by Ahmad Fatoum at 2024-12-04T15:24:52+01:00
    rtc: optionally return raw time from RTC_Linux_ReadTime*
    
    For use with RCL_AddSample in the incoming RTC reference clock driver,
    we'll want access not to the cooked timestamps, but to the raw ones.
    
    Otherwise, the core reference clock code complains:
    
      (valid_sample_time) RTC0 refclock sample time 1721242673.092211891
        not valid age=-3.092007
    
    Support both use cases by have the RTC_Linux_ReadTime_* functions take
    two nullable pointers, one for cooked and the other for raw time.
    
  • 4f22883f
    by Uwe Kleine-König at 2024-12-04T15:58:10+01:00
    refclock: add new refclock for RTCs
    
    This refclock uses an RTC as reference source. If the RTC doesn't
    support reporting an update event this source is quite coarse as it
    usually needs a slow bus access to be read and has a precision of only
    one second. If reporting an update event is available, the time is read
    just after such an event which improves precision.
    
    Depending on hardware capabilities you might want to combine it with a
    PPS reference clock sourced from the same chip.
    
    Note that you can enable UIE emulation in the Linux kernel to make a RTC
    without interrupt support look like one with irqs in return for some
    system and bus overhead.
    
    Co-authored-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
    

8 changed files:



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/