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 tag 'timers-clocksource-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull clocksource updates from Thomas Gleixner:
"A rather small set of boring cleanups, fixes and improvements"

* tag 'timers-clocksource-2026-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/mips-gic-timer: Move GIC timer to request_percpu_irq()
clocksource/drivers/timer-sp804: Fix an Oops when read_current_timer is called on ARM32 platforms where the SP804 is not registered as the sched_clock.
clocksource/drivers/armada-370-xp: Fix dead link to timer binding
clocksource/drivers/timer-integrator-ap: Add missing Kconfig dependency on OF
clocksource/drivers/sh_tmu: Always leave device running after probe

+11 -24
+1
drivers/clocksource/Kconfig
··· 254 254 255 255 config INTEGRATOR_AP_TIMER 256 256 bool "Integrator-AP timer driver" if COMPILE_TEST 257 + depends on OF 257 258 select CLKSRC_MMIO 258 259 help 259 260 Enables support for the Integrator-AP timer.
-18
drivers/clocksource/sh_tmu.c
··· 143 143 144 144 static int __sh_tmu_enable(struct sh_tmu_channel *ch) 145 145 { 146 - int ret; 147 - 148 - /* enable clock */ 149 - ret = clk_enable(ch->tmu->clk); 150 - if (ret) { 151 - dev_err(&ch->tmu->pdev->dev, "ch%u: cannot enable clock\n", 152 - ch->index); 153 - return ret; 154 - } 155 - 156 146 /* make sure channel is disabled */ 157 147 sh_tmu_start_stop_ch(ch, 0); 158 148 ··· 164 174 if (ch->enable_count++ > 0) 165 175 return 0; 166 176 167 - pm_runtime_get_sync(&ch->tmu->pdev->dev); 168 177 dev_pm_syscore_device(&ch->tmu->pdev->dev, true); 169 178 170 179 return __sh_tmu_enable(ch); ··· 176 187 177 188 /* disable interrupts in TMU block */ 178 189 sh_tmu_write(ch, TCR, TCR_TPSC_CLK4); 179 - 180 - /* stop clock */ 181 - clk_disable(ch->tmu->clk); 182 190 } 183 191 184 192 static void sh_tmu_disable(struct sh_tmu_channel *ch) ··· 189 203 __sh_tmu_disable(ch); 190 204 191 205 dev_pm_syscore_device(&ch->tmu->pdev->dev, false); 192 - pm_runtime_put(&ch->tmu->pdev->dev); 193 206 } 194 207 195 208 static void sh_tmu_set_next(struct sh_tmu_channel *ch, unsigned long delta, ··· 537 552 goto err_clk_unprepare; 538 553 539 554 tmu->rate = clk_get_rate(tmu->clk) / 4; 540 - clk_disable(tmu->clk); 541 555 542 556 /* Map the memory resource. */ 543 557 ret = sh_tmu_map_memory(tmu); ··· 610 626 out: 611 627 if (tmu->has_clockevent || tmu->has_clocksource) 612 628 pm_runtime_irq_safe(&pdev->dev); 613 - else 614 - pm_runtime_idle(&pdev->dev); 615 629 616 630 return 0; 617 631 }
+1 -1
drivers/clocksource/timer-armada-370-xp.c
··· 22 22 * doing otherwise leads to using a clocksource whose frequency varies 23 23 * when doing cpufreq frequency changes. 24 24 * 25 - * See Documentation/devicetree/bindings/timer/marvell,armada-370-xp-timer.txt 25 + * See Documentation/devicetree/bindings/timer/marvell,armada-370-timer.yaml 26 26 */ 27 27 28 28 #include <linux/init.h>
+9 -5
drivers/clocksource/timer-sp804.c
··· 106 106 return ~readl_relaxed(sched_clkevt->value); 107 107 } 108 108 109 + /* Register delay timer backed by the hardware counter */ 109 110 #ifdef CONFIG_ARM 110 111 static struct delay_timer delay; 112 + static struct sp804_clkevt *delay_clkevt; 113 + 111 114 static unsigned long sp804_read_delay_timer_read(void) 112 115 { 113 - return sp804_read(); 116 + return ~readl_relaxed(delay_clkevt->value); 114 117 } 115 118 116 - static void sp804_register_delay_timer(int freq) 119 + static void sp804_register_delay_timer(struct sp804_clkevt *clk, int freq) 117 120 { 121 + delay_clkevt = clk; 118 122 delay.freq = freq; 119 123 delay.read_current_timer = sp804_read_delay_timer_read; 120 124 register_current_timer_delay(&delay); 121 125 } 122 126 #else 123 - static inline void sp804_register_delay_timer(int freq) {} 127 + static inline void sp804_register_delay_timer(struct sp804_clkevt *clk, int freq) {} 124 128 #endif 125 129 126 130 static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base, ··· 138 134 rate = sp804_get_clock_rate(clk, name); 139 135 if (rate < 0) 140 136 return -EINVAL; 141 - 142 - sp804_register_delay_timer(rate); 143 137 144 138 clkevt = sp804_clkevt_get(base); 145 139 ··· 153 151 154 152 clocksource_mmio_init(clkevt->value, name, 155 153 rate, 200, 32, clocksource_mmio_readl_down); 154 + 155 + sp804_register_delay_timer(clkevt, rate); 156 156 157 157 if (use_sched_clock) { 158 158 sched_clkevt = clkevt;