aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/clocksource/timer-imx-tpm.c2
-rw-r--r--include/linux/timekeeping32.h3
-rw-r--r--include/linux/timer.h2
-rw-r--r--kernel/time/posix-cpu-timers.c4
-rw-r--r--kernel/time/tick-oneshot.c11
-rw-r--r--kernel/time/timekeeping.c7
6 files changed, 9 insertions, 20 deletions
diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-imx-tpm.c
index 05d97a6871d8..6c8318470b48 100644
--- a/drivers/clocksource/timer-imx-tpm.c
+++ b/drivers/clocksource/timer-imx-tpm.c
@@ -114,7 +114,7 @@ static int tpm_set_next_event(unsigned long delta,
114 * of writing CNT registers which may cause the min_delta event got 114 * of writing CNT registers which may cause the min_delta event got
115 * missed, so we need add a ETIME check here in case it happened. 115 * missed, so we need add a ETIME check here in case it happened.
116 */ 116 */
117 return (int)((next - now) <= 0) ? -ETIME : 0; 117 return (int)(next - now) <= 0 ? -ETIME : 0;
118} 118}
119 119
120static int tpm_set_state_oneshot(struct clock_event_device *evt) 120static int tpm_set_state_oneshot(struct clock_event_device *evt)
diff --git a/include/linux/timekeeping32.h b/include/linux/timekeeping32.h
index af4114d5dc17..3616b4becb59 100644
--- a/include/linux/timekeeping32.h
+++ b/include/linux/timekeeping32.h
@@ -9,9 +9,6 @@
9extern void do_gettimeofday(struct timeval *tv); 9extern void do_gettimeofday(struct timeval *tv);
10unsigned long get_seconds(void); 10unsigned long get_seconds(void);
11 11
12/* does not take xtime_lock */
13struct timespec __current_kernel_time(void);
14
15static inline struct timespec current_kernel_time(void) 12static inline struct timespec current_kernel_time(void)
16{ 13{
17 struct timespec64 now = current_kernel_time64(); 14 struct timespec64 now = current_kernel_time64();
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 2448f9cc48a3..7b066fd38248 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -8,8 +8,6 @@
8#include <linux/debugobjects.h> 8#include <linux/debugobjects.h>
9#include <linux/stringify.h> 9#include <linux/stringify.h>
10 10
11struct tvec_base;
12
13struct timer_list { 11struct timer_list {
14 /* 12 /*
15 * All fields that change during normal runtime grouped to the 13 * All fields that change during normal runtime grouped to the
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 2541bd89f20e..5a6251ac6f7a 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -1205,10 +1205,12 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx,
1205 u64 *newval, u64 *oldval) 1205 u64 *newval, u64 *oldval)
1206{ 1206{
1207 u64 now; 1207 u64 now;
1208 int ret;
1208 1209
1209 WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED); 1210 WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);
1211 ret = cpu_timer_sample_group(clock_idx, tsk, &now);
1210 1212
1211 if (oldval && cpu_timer_sample_group(clock_idx, tsk, &now) != -EINVAL) { 1213 if (oldval && ret != -EINVAL) {
1212 /* 1214 /*
1213 * We are setting itimer. The *oldval is absolute and we update 1215 * We are setting itimer. The *oldval is absolute and we update
1214 * it to be relative, *newval argument is relative and we update 1216 * it to be relative, *newval argument is relative and we update
diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c
index c1f518e7aa80..6fe615d57ebb 100644
--- a/kernel/time/tick-oneshot.c
+++ b/kernel/time/tick-oneshot.c
@@ -82,16 +82,15 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *))
82 if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || 82 if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) ||
83 !tick_device_is_functional(dev)) { 83 !tick_device_is_functional(dev)) {
84 84
85 printk(KERN_INFO "Clockevents: " 85 pr_info("Clockevents: could not switch to one-shot mode:");
86 "could not switch to one-shot mode:");
87 if (!dev) { 86 if (!dev) {
88 printk(" no tick device\n"); 87 pr_cont(" no tick device\n");
89 } else { 88 } else {
90 if (!tick_device_is_functional(dev)) 89 if (!tick_device_is_functional(dev))
91 printk(" %s is not functional.\n", dev->name); 90 pr_cont(" %s is not functional.\n", dev->name);
92 else 91 else
93 printk(" %s does not support one-shot mode.\n", 92 pr_cont(" %s does not support one-shot mode.\n",
94 dev->name); 93 dev->name);
95 } 94 }
96 return -EINVAL; 95 return -EINVAL;
97 } 96 }
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index ca90219a1e73..dcf7f20fcd12 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -2139,13 +2139,6 @@ unsigned long get_seconds(void)
2139} 2139}
2140EXPORT_SYMBOL(get_seconds); 2140EXPORT_SYMBOL(get_seconds);
2141 2141
2142struct timespec __current_kernel_time(void)
2143{
2144 struct timekeeper *tk = &tk_core.timekeeper;
2145
2146 return timespec64_to_timespec(tk_xtime(tk));
2147}
2148
2149struct timespec64 current_kernel_time64(void) 2142struct timespec64 current_kernel_time64(void)
2150{ 2143{
2151 struct timekeeper *tk = &tk_core.timekeeper; 2144 struct timekeeper *tk = &tk_core.timekeeper;