timer fixes
Subsystems (4)
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: 3f2552f7e9c5abef2775c53f7af66532f8bf65bc timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()
Misc clocksource driver fixes, and a sched-clock wrapping fix.
Thanks,
Ingo
------------------>
Arnd Bergmann (1):
clocksource/drivers/npcm: select TIMER_OF
Chang-An Chen (1):
timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()
Nathan Chancellor (1):
clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start
Neil Armstrong (1):
clocksource/drivers/oxnas: Fix OX820 compatible
Yangtao Li (1):
clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro
drivers/clocksource/Kconfig | 1 + drivers/clocksource/arm_arch_timer.c | 5 +---- drivers/clocksource/timer-oxnas-rps.c | 2 +- drivers/clocksource/timer-ti-dm.c | 28 ---------------------------- kernel/time/sched_clock.c | 4 ++-- kernel/time/tick-common.c | 2 ++ kernel/time/timekeeping.h | 7 +++++++ 7 files changed, 14 insertions(+), 35 deletions(-)
drivers/clocksource/Kconfig +1 -0
@@ -145,6 +145,7 @@ config VT8500_TIMER config NPCM7XX_TIMER bool "NPCM7xx timer driver" if COMPILE_TEST depends on HAS_IOMEM + select TIMER_OF select CLKSRC_MMIO help Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,
drivers/clocksource/arm_arch_timer.c +1 -4
@@ -9,7 +9,7 @@* published by the Free Software Foundation. */ -#define pr_fmt (fmt) "arm_arch_timer: " fmt +#define pr_fmt (fmt) "arch_timer: " fmt#include <linux/init.h> #include <linux/kernel.h>
@@ -33,9 +33,6 @@#include <clocksource/arm_arch_timer.h> -#undef pr_fmt -#define pr_fmt (fmt) "arch_timer: " fmt -#define CNTTIDR 0x08#define CNTTIDR_VIRT (n) (BIT(1) << ((n) * 4))
drivers/clocksource/timer-oxnas-rps.c +1 -1
@@ -296,4 +296,4 @@ static int __init oxnas_rps_timer_init(struct device_node *np)TIMER_OF_DECLARE (ox810se_rps,"oxsemi,ox810se-rps-timer" , oxnas_rps_timer_init);TIMER_OF_DECLARE (ox820_rps, -"oxsemi,ox820se-rps-timer" , oxnas_rps_timer_init); +"oxsemi,ox820-rps-timer" , oxnas_rps_timer_init);
drivers/clocksource/timer-ti-dm.c +0 -28
@@ -585,34 +585,6 @@ static int omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,return 0 ; } -/* Optimized set_load which removes costly spin wait in timer_start */ -static int omap_dm_timer_set_load_start (struct omap_dm_timer *timer, -int autoreload,unsigned int load) -{ -u32 l; - -if (unlikely (!timer)) -return -EINVAL ; - -omap_dm_timer_enable (timer); - - l =omap_dm_timer_read_reg (timer,OMAP_TIMER_CTRL_REG ); -if (autoreload) { - l |=OMAP_TIMER_CTRL_AR ; -omap_dm_timer_write_reg (timer,OMAP_TIMER_LOAD_REG , load); - }else { - l &= ~OMAP_TIMER_CTRL_AR ; - } - l |=OMAP_TIMER_CTRL_ST ; - -__omap_dm_timer_load_start (timer, l, load, timer->posted); - -/* Save the context */ - timer->context.tclr = l; - timer->context.tldr = load; - timer->context.tcrr = load; -return 0 ; -}static int omap_dm_timer_set_match (struct omap_dm_timer *timer,int enable,unsigned int match) {
kernel/time/sched_clock.c +2 -2
@@ -272,7 +272,7 @@ static u64 notrace suspended_sched_clock_read(void)return cd.read_data[seq &1 ].epoch_cyc; } -static int sched_clock_suspend (void ) +int sched_clock_suspend (void ) {struct clock_read_data *rd = &cd.read_data[0 ];
@@ -283,7 +283,7 @@ static int sched_clock_suspend(void)return 0 ; } -static void sched_clock_resume (void ) +void sched_clock_resume (void ) {struct clock_read_data *rd = &cd.read_data[0 ];
kernel/time/tick-common.c +2 -0
@@ -487,6 +487,7 @@ void tick_freeze(void)trace_suspend_resume (TPS ("timekeeping_freeze" ),smp_processor_id (), true); system_state =SYSTEM_SUSPEND ; +sched_clock_suspend ();timekeeping_suspend (); }else {tick_suspend_local ();
@@ -510,6 +511,7 @@ void tick_unfreeze(void)if (tick_freeze_depth ==num_online_cpus ()) {timekeeping_resume (); +sched_clock_resume (); system_state =SYSTEM_RUNNING ;trace_suspend_resume (TPS ("timekeeping_freeze" ),smp_processor_id (), false);
kernel/time/timekeeping.h +7 -0
@@ -14,6 +14,13 @@ extern u64 timekeeping_max_deferment(void);extern void timekeeping_warp_clock (void );extern int timekeeping_suspend (void );extern void timekeeping_resume (void ); +#ifdef CONFIG_GENERIC_SCHED_CLOCK +extern int sched_clock_suspend (void ); +extern void sched_clock_resume (void ); +#else +static inline int sched_clock_suspend (void ) {return 0 ; } +static inline void sched_clock_resume (void ) { } +#endif extern void do_timer (unsigned long ticks);extern void update_wall_time (void );
The pull request you sent on Sat, 20 Apr 2019 09:45:50 +0200:
The pull request you sent on Sat, 20 Apr 2019 09:45:50 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittimers-urgent-for-linus
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e899cc3b3d9813f795c039c0f3c689861d6836da
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker