projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
kernel
/
time.c
diff --git
a/kernel/time.c
b/kernel/time.c
index e325597f5bf53fbe000605cd74b8c3ec5f94976e..2289a8d68314f35f3c6b10f7edf8e53b721b8857 100644
(file)
--- a/
kernel/time.c
+++ b/
kernel/time.c
@@
-57,17
+57,14
@@
EXPORT_SYMBOL(sys_tz);
*/
asmlinkage long sys_time(time_t __user * tloc)
{
*/
asmlinkage long sys_time(time_t __user * tloc)
{
- /*
- * We read xtime.tv_sec atomically - it's updated
- * atomically by update_wall_time(), so no need to
- * even read-lock the xtime seqlock:
- */
- time_t i = xtime.tv_sec;
+ time_t i;
+ struct timespec tv;
- smp_rmb(); /* sys_time() results are coherent */
+ getnstimeofday(&tv);
+ i = tv.tv_sec;
if (tloc) {
if (tloc) {
- if (put_user(i,
tloc))
+ if (put_user(i,tloc))
i = -EFAULT;
}
return i;
i = -EFAULT;
}
return i;
@@
-218,22
+215,6
@@
asmlinkage long sys_adjtimex(struct timex __user *txc_p)
return copy_to_user(txc_p, &txc, sizeof(struct timex)) ? -EFAULT : ret;
}
return copy_to_user(txc_p, &txc, sizeof(struct timex)) ? -EFAULT : ret;
}
-inline struct timespec current_kernel_time(void)
-{
- struct timespec now;
- unsigned long seq;
-
- do {
- seq = read_seqbegin(&xtime_lock);
-
- now = xtime;
- } while (read_seqretry(&xtime_lock, seq));
-
- return now;
-}
-
-EXPORT_SYMBOL(current_kernel_time);
-
/**
* current_fs_time - Return FS time
* @sb: Superblock.
/**
* current_fs_time - Return FS time
* @sb: Superblock.