Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3618886f authored by Ben Dooks's avatar Ben Dooks Committed by Russell King
Browse files

[ARM] 2857/2: Dynamic tick - fix OOPS if configured and not provided



Patch from Ben Dooks

timer_dyn_reprogram() fails with an OOPS if the
configuration for CONFIG_NO_IDLE_HZ is enabled, and
the system has no support for it.

Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 083bc6b3
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -433,11 +433,13 @@ void timer_dyn_reprogram(void)
{
	struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;

	if (dyn_tick) {
		write_seqlock(&xtime_lock);
		if (dyn_tick->state & DYN_TICK_ENABLED)
			dyn_tick->reprogram(next_timer_interrupt() - jiffies);
		write_sequnlock(&xtime_lock);
	}
}

static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf)
{