All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Igor Plyatov <plyatov@gmail.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	linux-kernel@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, util-linux@vger.kernel.org
Subject: Re: 500 ms delay in time saved into RTC
Date: Mon, 19 Feb 2018 11:07:54 +0100	[thread overview]
Message-ID: <20180219100754.GL14177@piout.net> (raw)
In-Reply-To: <c91e0079-c31f-715d-bb2e-648af34565d7@gmail.com>

On 19/02/2018 at 12:16:04 +0300, Igor Plyatov wrote:
> Dear Rasmus,
> 
> thank you very much for explanation!
> 
> I have set "RTC_SET_DELAY_SECS = 0.0" in hwclock.c and got acceptable
> result.
> 
> It wonder why such critical function does not implemented on kernel level in
> RTC driver?
> It is very strange to rely on specific HW in user space SW.
> 

Because of the way the API is designed, handling the MC146818A oddity is
not possible in the driver (i.e. 50% of the time, it will be too late
to handle it).

You can use busybox hwclock which has the x86 insanity commented out:
https://git.busybox.net/busybox/tree/util-linux/hwclock.c


-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

  reply	other threads:[~2018-02-19 10:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19  6:40 500 ms delay in time saved into RTC Igor Plyatov
2018-02-19  7:11 ` Rasmus Villemoes
2018-02-19  9:16   ` Igor Plyatov
2018-02-19 10:07     ` Alexandre Belloni [this message]
2018-02-19 10:37       ` Rasmus Villemoes
2018-02-19 11:03   ` Karel Zak
2018-02-19 11:31     ` Igor Plyatov
2018-07-18 12:12       ` Karel Zak
2018-02-25  0:34     ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180219100754.GL14177@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plyatov@gmail.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=rtc-linux@googlegroups.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.