Commit c1e9dae0 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
 "A small set of timer fixes:

   - Evaluate the -ETIME condition correctly in the imx tpm driver

   - Fix the evaluation order of a condition in posix cpu timers

   - Use pr_cont() in the clockevents code to prevent ugly message
     splitting

   - Remove __current_kernel_time() which is now unused to prevent that
     new users show up.

   - Remove a stale forward declaration"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource/imx-tpm: Correct -ETIME return condition check
  posix-cpu-timers: Ensure set_process_cpu_timer is always evaluated
  timekeeping: Remove __current_kernel_time()
  timers: Remove stale struct tvec_base forward declaration
  clockevents: Fix kernel messages split across multiple lines
parents 38f0b33e 74071884
...@@ -114,7 +114,7 @@ static int tpm_set_next_event(unsigned long delta, ...@@ -114,7 +114,7 @@ static int tpm_set_next_event(unsigned long delta,
* of writing CNT registers which may cause the min_delta event got * of writing CNT registers which may cause the min_delta event got
* missed, so we need add a ETIME check here in case it happened. * missed, so we need add a ETIME check here in case it happened.
*/ */
return (int)((next - now) <= 0) ? -ETIME : 0; return (int)(next - now) <= 0 ? -ETIME : 0;
} }
static int tpm_set_state_oneshot(struct clock_event_device *evt) static int tpm_set_state_oneshot(struct clock_event_device *evt)
......
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
extern void do_gettimeofday(struct timeval *tv); extern void do_gettimeofday(struct timeval *tv);
unsigned long get_seconds(void); unsigned long get_seconds(void);
/* does not take xtime_lock */
struct timespec __current_kernel_time(void);
static inline struct timespec current_kernel_time(void) static inline struct timespec current_kernel_time(void)
{ {
struct timespec64 now = current_kernel_time64(); struct timespec64 now = current_kernel_time64();
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include <linux/debugobjects.h> #include <linux/debugobjects.h>
#include <linux/stringify.h> #include <linux/stringify.h>
struct tvec_base;
struct timer_list { struct timer_list {
/* /*
* All fields that change during normal runtime grouped to the * All fields that change during normal runtime grouped to the
......
...@@ -1205,10 +1205,12 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx, ...@@ -1205,10 +1205,12 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clock_idx,
u64 *newval, u64 *oldval) u64 *newval, u64 *oldval)
{ {
u64 now; u64 now;
int ret;
WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED); WARN_ON_ONCE(clock_idx == CPUCLOCK_SCHED);
ret = cpu_timer_sample_group(clock_idx, tsk, &now);
if (oldval && cpu_timer_sample_group(clock_idx, tsk, &now) != -EINVAL) { if (oldval && ret != -EINVAL) {
/* /*
* We are setting itimer. The *oldval is absolute and we update * We are setting itimer. The *oldval is absolute and we update
* it to be relative, *newval argument is relative and we update * it to be relative, *newval argument is relative and we update
......
...@@ -82,15 +82,14 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *)) ...@@ -82,15 +82,14 @@ int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *))
if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) || if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) ||
!tick_device_is_functional(dev)) { !tick_device_is_functional(dev)) {
printk(KERN_INFO "Clockevents: " pr_info("Clockevents: could not switch to one-shot mode:");
"could not switch to one-shot mode:");
if (!dev) { if (!dev) {
printk(" no tick device\n"); pr_cont(" no tick device\n");
} else { } else {
if (!tick_device_is_functional(dev)) if (!tick_device_is_functional(dev))
printk(" %s is not functional.\n", dev->name); pr_cont(" %s is not functional.\n", dev->name);
else else
printk(" %s does not support one-shot mode.\n", pr_cont(" %s does not support one-shot mode.\n",
dev->name); dev->name);
} }
return -EINVAL; return -EINVAL;
......
...@@ -2139,13 +2139,6 @@ unsigned long get_seconds(void) ...@@ -2139,13 +2139,6 @@ unsigned long get_seconds(void)
} }
EXPORT_SYMBOL(get_seconds); EXPORT_SYMBOL(get_seconds);
struct timespec __current_kernel_time(void)
{
struct timekeeper *tk = &tk_core.timekeeper;
return timespec64_to_timespec(tk_xtime(tk));
}
struct timespec64 current_kernel_time64(void) struct timespec64 current_kernel_time64(void)
{ {
struct timekeeper *tk = &tk_core.timekeeper; struct timekeeper *tk = &tk_core.timekeeper;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment