On Tue, 29 Jan 2019 at 00:07, Stuart Menefy <stuart.menefy@xxxxxxxxxxxxxxxx> wrote: > > Ensure that after we have stopped the timer any pending interrupts > are cleared. This fixes a problem when suspending, as interrupts are > disabled before the timer is stopped, so the timer interrupt may still > be asserted, preventing the system entering a low power state when the > wfi is executed. > > Signed-off-by: Stuart Menefy <stuart.menefy@xxxxxxxxxxxxxxxx> > --- > drivers/clocksource/exynos_mct.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c > index 7a244b681876..c99d0b6e8b5f 100644 > --- a/drivers/clocksource/exynos_mct.c > +++ b/drivers/clocksource/exynos_mct.c > @@ -398,12 +398,15 @@ static int exynos4_tick_set_next_event(unsigned long cycles, > return 0; > } > > +static void exynos4_mct_tick_clear(struct mct_clock_event_device *mevt); > + > static int set_state_shutdown(struct clock_event_device *evt) > { > struct mct_clock_event_device *mevt; > > mevt = container_of(evt, struct mct_clock_event_device, evt); > exynos4_mct_tick_stop(mevt); > + exynos4_mct_tick_clear(mevt); exynos4_mct_tick_clear() calls stop for periodic clockevents so this could be duplicated stop. The exynos4_mct_tick_clear() should then only clear, not stop+clear. In general, are you sure that this is needed? After stopping the timer, still if any interrupt fires the request handler should be called and be processed. Best regards, Krzysztof > return 0; > } > > -- > 2.13.6 >