aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2012-09-11 19:58:13 -0400
committerJohn Stultz <john.stultz@linaro.org>2012-09-24 12:38:08 -0400
commit576094b7f0aaf41aadab9b7d4e5bd85faa432711 (patch)
tree9cf7a86b58e5b6242625663af274b594085487fa /kernel/time
parent706394211648117762edfaeffd6fc04bf3b1a75d (diff)
time: Introduce new GENERIC_TIME_VSYSCALL
Now that we moved everyone over to GENERIC_TIME_VSYSCALL_OLD, introduce the new declaration and config option for the new update_vsyscall method. Cc: Tony Luck <tony.luck@intel.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Turner <pjt@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/Kconfig4
-rw-r--r--kernel/time/timekeeping.c14
2 files changed, 5 insertions, 13 deletions
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig
index 489c86154d1f..8601f0db1261 100644
--- a/kernel/time/Kconfig
+++ b/kernel/time/Kconfig
@@ -13,6 +13,10 @@ config ARCH_CLOCKSOURCE_DATA
13 bool 13 void (*con_bmove)(struct vc_data *, int, int, int, int, int, int); int (*con_switch)(struct vc_data *); int (*con_blank)(struct vc_data *, int, int); int (*con_font_set)(struct vc_data *, struct console_font *, unsigned); int (*con_font_get)(struct vc_data *, struct console_font *); int (*con_font_default)(struct vc_data *, struct console_font *, char *); int (*con_font_copy)(struct vc_data *, int); int (*con_resize)(struct vc_data *, unsigned int, unsigned int, unsigned int); int (*con_set_palette)(struct vc_data *, unsigned char *); int (*con_scrolldelta)(struct vc_data *, int); int (*con_set_origin)(struct vc_data *); void (*con_save_screen)(struct vc_data
@@ -42,15 +42,6 @@ static inline void tk_normalize_xtime(struct timekeeper *tk)
42 } 42 }
43} 43}
44 44
45static struct timespec tk_xtime(struct timekeeper *tk)
46{
47 struct timespec ts;
48
49 ts.tv_sec = tk->xtime_sec;
50 ts.tv_nsec = (long)(tk->xtime_nsec >> tk->shift);
51 return ts;
52}
53
54static void tk_set_xtime(struct timekeeper *tk, const struct timespec *ts) 45static void tk_set_xtime(struct timekeeper *tk, const struct timespec *ts)
55{ 46{
56 tk->xtime_sec = ts->tv_sec; 47 tk->xtime_sec = ts->tv_sec;
@@ -192,14 +183,11 @@ static inline s64 timekeeping_get_ns_raw(struct timekeeper *tk)
192/* must hold write on timekeeper.lock */ 183/* must hold write on timekeeper.lock */
193static void timekeeping_update(struct timekeeper *tk, bool clearntp) 184static void timekeeping_update(struct timekeeper *tk, bool clearntp)
194{ 185{
195 struct timespec xt;
196
197 if (clearntp) { 186 if (clearntp) {
198 tk->ntp_error = 0; 187 tk->ntp_error = 0;
199 ntp_clear(); 188 ntp_clear();
200 } 189 }
201 xt = tk_xtime(tk); 190 update_vsyscall(tk);
202 update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult);
203} 191}
204 192
205/** 193/**
extern struct console *console_drivers; extern void console_lock(void); extern int console_trylock(void); extern void console_unlock(void); extern void console_conditional_schedule(void); extern void console_unblank(void); extern struct tty_driver *console_device(int *); extern void console_stop(struct console *); extern void console_start(struct console *); extern int is_console_locked(void); extern int braille_register_console(struct console *, int index, char *console_options, char *braille_options); extern int braille_unregister_console(struct console *); extern void console_sysfs_notify(void); extern int console_suspend_enabled; /* Suspend and resume console messages over PM events */ extern void suspend_console(void); extern void resume_console(void); int mda_console_init(void); void prom_con_init(void); void vcs_make_sysfs(int index); void vcs_remove_sysfs(int index); /* Some debug stub to catch some of the obvious races in the VT code */ #if 1 #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) #else #define WARN_CONSOLE_UNLOCKED() #endif /* VESA Blanking Levels */ #define VESA_NO_BLANKING 0 #define VESA_VSYNC_SUSPEND 1 #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 #ifdef CONFIG_VGA_CONSOLE extern bool vgacon_text_force(void); #endif #endif /* _LINUX_CONSOLE_H */