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:
"Three clocksource driver fixes"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/mips-gic-timer: Make gic_clocksource_of_init() return int
clocksource/drivers/kona: Fix get_counter() error handling
clocksource/drivers/time-armada-370-xp: Fix the clock reference

+11 -8
+10 -6
drivers/clocksource/bcm_kona_timer.c
··· 66 66 67 67 } 68 68 69 - static void 69 + static int 70 70 kona_timer_get_counter(void __iomem *timer_base, uint32_t *msw, uint32_t *lsw) 71 71 { 72 - int loop_limit = 4; 72 + int loop_limit = 3; 73 73 74 74 /* 75 75 * Read 64-bit free running counter ··· 83 83 * if new hi-word is equal to previously read hi-word then stop. 84 84 */ 85 85 86 - while (--loop_limit) { 86 + do { 87 87 *msw = readl(timer_base + KONA_GPTIMER_STCHI_OFFSET); 88 88 *lsw = readl(timer_base + KONA_GPTIMER_STCLO_OFFSET); 89 89 if (*msw == readl(timer_base + KONA_GPTIMER_STCHI_OFFSET)) 90 90 break; 91 - } 91 + } while (--loop_limit); 92 92 if (!loop_limit) { 93 93 pr_err("bcm_kona_timer: getting counter failed.\n"); 94 94 pr_err(" Timer will be impacted\n"); 95 + return -ETIMEDOUT; 95 96 } 96 97 97 - return; 98 + return 0; 98 99 } 99 100 100 101 static int kona_timer_set_next_event(unsigned long clc, ··· 113 112 114 113 uint32_t lsw, msw; 115 114 uint32_t reg; 115 + int ret; 116 116 117 - kona_timer_get_counter(timers.tmr_regs, &msw, &lsw); 117 + ret = kona_timer_get_counter(timers.tmr_regs, &msw, &lsw); 118 + if (ret) 119 + return ret; 118 120 119 121 /* Load the "next" event tick value */ 120 122 writel(lsw + clc, timers.tmr_regs + KONA_GPTIMER_STCM0_OFFSET);
+1 -1
drivers/clocksource/mips-gic-timer.c
··· 164 164 gic_start_count(); 165 165 } 166 166 167 - static void __init gic_clocksource_of_init(struct device_node *node) 167 + static int __init gic_clocksource_of_init(struct device_node *node) 168 168 { 169 169 struct clk *clk; 170 170 int ret;
-1
drivers/clocksource/time-armada-370-xp.c
··· 338 338 struct clk *clk = of_clk_get_by_name(np, "fixed"); 339 339 int ret; 340 340 341 - clk = of_clk_get(np, 0); 342 341 if (IS_ERR(clk)) { 343 342 pr_err("Failed to get clock"); 344 343 return PTR_ERR(clk);