]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
time: Add timekeeping snapshot code capturing system time and counter
authorChristopher S. Hall <christopher.s.hall@intel.com>
Mon, 22 Feb 2016 11:15:20 +0000 (03:15 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:28:45 +0000 (10:28 +0100)
commita406241f8976f4b2ab2eb4777ecc663897bd8752
treee6445bc810a94065c78167bb8b5423e33f2d7004
parent33bb7a475834ac6a62db9ea562a72567d133bb71
time: Add timekeeping snapshot code capturing system time and counter

BugLink: http://bugs.launchpad.net/bugs/1519625
In the current timekeeping code there isn't any interface to
atomically capture the current relationship between the system counter
and system time. ktime_get_snapshot() returns this triple (counter,
monotonic raw, realtime) in the system_time_snapshot struct.

Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: kevin.b.stanton@intel.com
Cc: kevin.j.clarke@intel.com
Cc: hpa@zytor.com
Cc: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Christopher S. Hall <christopher.s.hall@intel.com>
[jstultz: Moved structure definitions around to clean things up,
 fixed cycles_t/cycle_t confusion.]
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 9da0f49c8767cc0ef6101cb21156cf4380ed50dd)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
include/linux/timekeeping.h
kernel/time/timekeeping.c