Skip to content

Cleanup ADJ_SETOFFSET patch

John Stultz lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3time: Introduce timekeeping_inject_offsetinclude/linux/time.h kernel/time/timekeeping.c+37 -00 replies
2/3ntp: add ADJ_SETOFFSET mode bitinclude/linux/timex.h kernel/time/ntp.c+28 -17 replies
3/3ntp: Change ADJ_SETOFFSET implementation to use timekeeping_inject_offsetkernel/time/ntp.c+6 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Cleanup ADJ_SETOFFSET patch

I was looking to queue Richard's ADJ_SETOFFSET patch to see if it could be merged into -tip for 2.6.38, but on second glance I noticed the ugly local_irq_disable bits as well as the fact that adding the offset uses a gettime/add/settime pattern which will also add a small error as the action isn't atomic.

So I implemented a timekeeping function to add a fixed offset:
timekeeping_inject_offset(), and reworked Richard's code to make use of it.

Richard: Any objection here? Mind testing this with the rest of your patch queue?

Thomas: Any comments? Does this seem reasonable for 2.6.38? Should I fold my cleanups into Richard's patch?

thanks
-john

CC Richard Cochran <[email protected]>
CC Thomas Gleixner <[email protected]>

John Stultz (2):
time: Introduce timekeeping_inject_offset
ntp: Change ADJ_SETOFFSET implementation to use
timekeeping_inject_offset

Richard Cochran (1):
ntp: add ADJ_SETOFFSET mode bit

 include/linux/time.h      |    1 +
 include/linux/timex.h     |    3 ++-
 kernel/time/ntp.c         |   13 +++++++++++++
 kernel/time/timekeeping.c |   36 ++++++++++++++++++++++++++++++++++++
 4 files changed, 52 insertions(+), 1 deletions(-)
Signature · 1 line
1.7.3.2.146.gca209