linux-stable/arch/blackfin
Frederic Weisbecker 280f06774a nohz: Separate out irq exit and idle loop dyntick logic
The tick_nohz_stop_sched_tick() function, which tries to delay
the next timer tick as long as possible, can be called from two
places:

- From the idle loop to start the dytick idle mode
- From interrupt exit if we have interrupted the dyntick
idle mode, so that we reprogram the next tick event in
case the irq changed some internal state that requires this
action.

There are only few minor differences between both that
are handled by that function, driven by the ts->inidle
cpu variable and the inidle parameter. The whole guarantees
that we only update the dyntick mode on irq exit if we actually
interrupted the dyntick idle mode, and that we enter in RCU extended
quiescent state from idle loop entry only.

Split this function into:

- tick_nohz_idle_enter(), which sets ts->inidle to 1, enters
dynticks idle mode unconditionally if it can, and enters into RCU
extended quiescent state.

- tick_nohz_irq_exit() which only updates the dynticks idle mode
when ts->inidle is set (ie: if tick_nohz_idle_enter() has been called).

To maintain symmetry, tick_nohz_restart_sched_tick() has been renamed
into tick_nohz_idle_exit().

This simplifies the code and micro-optimize the irq exit path (no need
for local_irq_save there). This also prepares for the split between
dynticks and rcu extended quiescent state logics. We'll need this split to
further fix illegal uses of RCU in extended quiescent states in the idle
loop.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: David Miller <davem@davemloft.net>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2011-12-11 10:31:35 -08:00
..
boot Blackfin: encode cpu-rev into uImage name 2011-01-10 07:18:27 -05:00
configs Blackfin: bf548-ezkit: update defconfig 2011-10-25 19:51:32 -04:00
include Blackfin: add serial TX IRQ in individual platform resource 2011-11-14 17:11:25 +08:00
kernel nohz: Separate out irq exit and idle loop dyntick logic 2011-12-11 10:31:35 -08:00
lib Blackfin: strncpy: fix handling of zero lengths 2011-06-03 11:05:36 -04:00
mach-bf518 Blackfin: add serial TX IRQ in individual platform resource 2011-11-14 17:11:25 +08:00
mach-bf527 blackfin: Fixup export.h includes 2011-11-14 17:15:23 +08:00
mach-bf533 Blackfin: add serial TX IRQ in individual platform resource 2011-11-14 17:11:25 +08:00
mach-bf537 blackfin: Fixup export.h includes 2011-11-14 17:15:23 +08:00
mach-bf538 Blackfin: add serial TX IRQ in individual platform resource 2011-11-14 17:11:25 +08:00
mach-bf548 Blackfin: add serial TX IRQ in individual platform resource 2011-11-14 17:11:25 +08:00
mach-bf561 Blackfin: add serial TX IRQ in individual platform resource 2011-11-14 17:11:25 +08:00
mach-common blackfin: add module.h to files implicitly expecting to use it. 2011-10-31 19:31:02 -04:00
mm blackfin: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:01 -04:00
oprofile Blackfin arch: remove hardware PM code, oprofile not use it 2009-01-07 23:14:39 +08:00
ADI_BSD.txt Blackfin: mass clean up of copyright/licensing info 2009-10-07 04:36:26 -04:00
Kconfig Blackfin: drop unused Kconfig symbol 2011-10-25 19:51:59 -04:00
Kconfig.debug Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2011-05-25 15:34:14 -07:00
Makefile Blackfin: encode cpu-rev into uImage name 2011-01-10 07:18:27 -05:00