timer fixes
Subsystems (3)
Ingo Molnar
maintainerLinus,
Please pull the latest timers-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-for-linus
# HEAD: eef7635a22f6b144206b5ca2f1398f637acffc4d clockevents: Remove unused set_mode() callback
An fix for an abs()/abs64() bug that caused too slow NTP convergence on 32-bit kernels, plus a removal of an obsolete clockevents driver facility after all users got converted during the merge window.
Thanks,
Ingo
------------------>
John Stultz (1):
time: Fix timekeeping_freqadjust()'s incorrect use of abs() instead of abs64()
Viresh Kumar (1):
clockevents: Remove unused set_mode() callback
include/linux/clockchips.h | 29 +++++-------------------- kernel/time/clockevents.c | 42 +----------------------------------- kernel/time/tick-common.c | 1 - kernel/time/timekeeping.c | 2 +- kernel/time/timer_list.c | 54 +++++++++++++++++++++------------------------- 5 files changed, 31 insertions(+), 97 deletions(-)
include/linux/clockchips.h +5 -24
@@ -18,15 +18,6 @@struct clock_event_device ;struct module ; -/* Clock event mode commands for legacy ->set_mode(): OBSOLETE */ -enum clock_event_mode { -CLOCK_EVT_MODE_UNUSED , -CLOCK_EVT_MODE_SHUTDOWN , -CLOCK_EVT_MODE_PERIODIC , -CLOCK_EVT_MODE_ONESHOT , -CLOCK_EVT_MODE_RESUME , -}; -/* * Possible states of a clock event device. *
@@ -86,16 +77,14 @@ enum clock_event_state {* @min_delta_ns: minimum delta value in ns * @mult: nanosecond to cycles multiplier * @shift: nanoseconds to cycles divisor (power of two) -* @mode: operating mode, relevant only to ->set_mode(), OBSOLETE * @state_use_accessors:current state of the device, assigned by the core code * @features: features * @retries: number of forced programming retries -* @set_mode: legacy set mode function, only for modes <= CLOCK_EVT_MODE_RESUME. -* @set_state_periodic: switch state to periodic, if !set_mode -* @set_state_oneshot: switch state to oneshot, if !set_mode -* @set_state_oneshot_stopped: switch state to oneshot_stopped, if !set_mode -* @set_state_shutdown: switch state to shutdown, if !set_mode -* @tick_resume: resume clkevt device, if !set_mode +* @set_state_periodic: switch state to periodic +* @set_state_oneshot: switch state to oneshot +* @set_state_oneshot_stopped: switch state to oneshot_stopped +* @set_state_shutdown: switch state to shutdown +* @tick_resume: resume clkevt device * @broadcast: function to broadcast events * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration
@@ -116,18 +105,10 @@ struct clock_event_device {u64 min_delta_ns;u32 mult;u32 shift; -enum clock_event_mode mode;enum clock_event_state state_use_accessors;unsigned int features;unsigned long retries; -/* -* State transition callback(s): Only one of the two groups should be -* defined: -* - set_mode(), only for modes <= CLOCK_EVT_MODE_RESUME. -* - set_state_{shutdown|periodic|oneshot|oneshot_stopped}(), tick_resume(). -*/ -void (*set_mode)(enum clock_event_mode mode,struct clock_event_device *);int (*set_state_periodic)(struct clock_event_device *);int (*set_state_oneshot)(struct clock_event_device *);int (*set_state_oneshot_stopped)(struct clock_event_device *);
kernel/time/clockevents.c +1 -41
67 lines not on this page · raw message
kernel/time/tick-common.c +0 -1
@@ -398,7 +398,6 @@ void tick_shutdown(unsigned int cpu)* the set mode function! */ clockevent_set_state (dev,CLOCK_EVT_STATE_DETACHED ); - dev->mode =CLOCK_EVT_MODE_UNUSED ;clockevents_exchange_device (dev,NULL ); dev->event_handler = clockevents_handle_noop; td->evtdev =NULL ;
kernel/time/timekeeping.c +1 -1
@@ -1614,7 +1614,7 @@ static __always_inline void timekeeping_freqadjust(struct timekeeper *tk, negative = (tick_error <0 );/* Sort out the magnitude of the correction */ - tick_error =abs (tick_error); + tick_error =abs64 (tick_error);for (adj =0 ; tick_error > interval; adj++) tick_error >>=1 ;
kernel/time/timer_list.c +24 -30
71 lines not on this page · raw message