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.

clocksource/drivers/timer-rtl-otto: Do not interfere with interrupts

During normal operation the timers are reprogrammed including an
interrupt acknowledgement. This has no effect as the whole timer
is setup from scratch afterwards. Especially in an interrupt this
has already been done by rttm_timer_interrupt().

Change the behaviour as follows:

- Use rttm_disable_timer() during reprogramming
- Keep rttm_stop_timer() for all other use cases.

Downstream has already tested and confirmed a patch. See
https://github.com/openwrt/openwrt/pull/19468
https://forum.openwrt.org/t/support-for-rtl838x-based-managed-switches/57875/3788

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Tested-by: Stephen Howell <howels@allthatwemight.be>
Tested-by: Bjørn Mork <bjorn@mork.no>
Link: https://lore.kernel.org/r/20250804080328.2609287-4-markus.stockhausen@gmx.de

authored by

Markus Stockhausen and committed by
Daniel Lezcano
c445bffb ca90147e

+3 -3
+3 -3
drivers/clocksource/timer-rtl-otto.c
··· 141 141 142 142 RTTM_DEBUG(to->of_base.base); 143 143 rttm_bounce_timer(to->of_base.base, RTTM_CTRL_COUNTER); 144 - rttm_stop_timer(to->of_base.base); 144 + rttm_disable_timer(to->of_base.base); 145 145 rttm_set_period(to->of_base.base, delta); 146 146 rttm_start_timer(to, RTTM_CTRL_COUNTER); 147 147 ··· 154 154 155 155 RTTM_DEBUG(to->of_base.base); 156 156 rttm_bounce_timer(to->of_base.base, RTTM_CTRL_COUNTER); 157 - rttm_stop_timer(to->of_base.base); 157 + rttm_disable_timer(to->of_base.base); 158 158 rttm_set_period(to->of_base.base, RTTM_TICKS_PER_SEC / HZ); 159 159 rttm_start_timer(to, RTTM_CTRL_COUNTER); 160 160 ··· 167 167 168 168 RTTM_DEBUG(to->of_base.base); 169 169 rttm_bounce_timer(to->of_base.base, RTTM_CTRL_TIMER); 170 - rttm_stop_timer(to->of_base.base); 170 + rttm_disable_timer(to->of_base.base); 171 171 rttm_set_period(to->of_base.base, RTTM_TICKS_PER_SEC / HZ); 172 172 rttm_start_timer(to, RTTM_CTRL_TIMER); 173 173