Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull timer fixes from Ingo Molnar:
"Misc clocksource driver fixes, and a sched-clock wrapping fix"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timers/sched_clock: Prevent generic sched_clock wrap caused by tick_freeze()
clocksource/drivers/timer-ti-dm: Remove omap_dm_timer_set_load_start
clocksource/drivers/oxnas: Fix OX820 compatible
clocksource/drivers/arm_arch_timer: Remove unneeded pr_fmt macro
clocksource/drivers/npcm: select TIMER_OF

+14 -35
+1
drivers/clocksource/Kconfig
··· 145 145 config NPCM7XX_TIMER 146 146 bool "NPCM7xx timer driver" if COMPILE_TEST 147 147 depends on HAS_IOMEM 148 + select TIMER_OF 148 149 select CLKSRC_MMIO 149 150 help 150 151 Enable 24-bit TIMER0 and TIMER1 counters in the NPCM7xx architecture,
+1 -4
drivers/clocksource/arm_arch_timer.c
··· 9 9 * published by the Free Software Foundation. 10 10 */ 11 11 12 - #define pr_fmt(fmt) "arm_arch_timer: " fmt 12 + #define pr_fmt(fmt) "arch_timer: " fmt 13 13 14 14 #include <linux/init.h> 15 15 #include <linux/kernel.h> ··· 32 32 #include <asm/virt.h> 33 33 34 34 #include <clocksource/arm_arch_timer.h> 35 - 36 - #undef pr_fmt 37 - #define pr_fmt(fmt) "arch_timer: " fmt 38 35 39 36 #define CNTTIDR 0x08 40 37 #define CNTTIDR_VIRT(n) (BIT(1) << ((n) * 4))
+1 -1
drivers/clocksource/timer-oxnas-rps.c
··· 296 296 TIMER_OF_DECLARE(ox810se_rps, 297 297 "oxsemi,ox810se-rps-timer", oxnas_rps_timer_init); 298 298 TIMER_OF_DECLARE(ox820_rps, 299 - "oxsemi,ox820se-rps-timer", oxnas_rps_timer_init); 299 + "oxsemi,ox820-rps-timer", oxnas_rps_timer_init);
-28
drivers/clocksource/timer-ti-dm.c
··· 585 585 return 0; 586 586 } 587 587 588 - /* Optimized set_load which removes costly spin wait in timer_start */ 589 - static int omap_dm_timer_set_load_start(struct omap_dm_timer *timer, 590 - int autoreload, unsigned int load) 591 - { 592 - u32 l; 593 - 594 - if (unlikely(!timer)) 595 - return -EINVAL; 596 - 597 - omap_dm_timer_enable(timer); 598 - 599 - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); 600 - if (autoreload) { 601 - l |= OMAP_TIMER_CTRL_AR; 602 - omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); 603 - } else { 604 - l &= ~OMAP_TIMER_CTRL_AR; 605 - } 606 - l |= OMAP_TIMER_CTRL_ST; 607 - 608 - __omap_dm_timer_load_start(timer, l, load, timer->posted); 609 - 610 - /* Save the context */ 611 - timer->context.tclr = l; 612 - timer->context.tldr = load; 613 - timer->context.tcrr = load; 614 - return 0; 615 - } 616 588 static int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, 617 589 unsigned int match) 618 590 {
+2 -2
kernel/time/sched_clock.c
··· 272 272 return cd.read_data[seq & 1].epoch_cyc; 273 273 } 274 274 275 - static int sched_clock_suspend(void) 275 + int sched_clock_suspend(void) 276 276 { 277 277 struct clock_read_data *rd = &cd.read_data[0]; 278 278 ··· 283 283 return 0; 284 284 } 285 285 286 - static void sched_clock_resume(void) 286 + void sched_clock_resume(void) 287 287 { 288 288 struct clock_read_data *rd = &cd.read_data[0]; 289 289
+2
kernel/time/tick-common.c
··· 487 487 trace_suspend_resume(TPS("timekeeping_freeze"), 488 488 smp_processor_id(), true); 489 489 system_state = SYSTEM_SUSPEND; 490 + sched_clock_suspend(); 490 491 timekeeping_suspend(); 491 492 } else { 492 493 tick_suspend_local(); ··· 511 510 512 511 if (tick_freeze_depth == num_online_cpus()) { 513 512 timekeeping_resume(); 513 + sched_clock_resume(); 514 514 system_state = SYSTEM_RUNNING; 515 515 trace_suspend_resume(TPS("timekeeping_freeze"), 516 516 smp_processor_id(), false);
+7
kernel/time/timekeeping.h
··· 14 14 extern void timekeeping_warp_clock(void); 15 15 extern int timekeeping_suspend(void); 16 16 extern void timekeeping_resume(void); 17 + #ifdef CONFIG_GENERIC_SCHED_CLOCK 18 + extern int sched_clock_suspend(void); 19 + extern void sched_clock_resume(void); 20 + #else 21 + static inline int sched_clock_suspend(void) { return 0; } 22 + static inline void sched_clock_resume(void) { } 23 + #endif 17 24 18 25 extern void do_timer(unsigned long ticks); 19 26 extern void update_wall_time(void);