linux/arch/microblaze/kernel
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
..
cpu microblaze: Add PVR for Microblaze v8.20.a 2011-10-14 12:24:28 +02:00
asm-offsets.c microblaze: Remove "cache" optimized copy_page function 2010-05-06 11:21:58 +02:00
dma.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
early_printk.c microblaze: Add support for early console on mdm 2011-07-25 09:25:26 +02:00
entry-nommu.S microblaze: Do not use "la" pseudo instruction - use addik instead 2011-03-09 08:09:54 +01:00
entry.S microblaze: Do not copy reset vectors/manual reset vector setup 2011-03-15 10:59:00 +01:00
exceptions.c microblaze: Raise SIGFPE/FPE_INTDIV for div by zero 2011-10-14 12:24:31 +02:00
ftrace.c microblaze: Fix ftrace 2011-04-01 09:34:51 +02:00
head.S microblaze: Do not use "la" pseudo instruction - use addik instead 2011-03-09 08:09:54 +01:00
heartbeat.c microblaze: Add support for little-endian Microblaze 2010-10-21 15:51:59 +10:00
hw_exception_handler.S microblaze: Fix unaligned value saving to the stack for system with MMU 2011-07-25 09:07:45 +02:00
init_task.c Use new __init_task_data macro in arch init_task.c files. 2009-09-21 06:27:08 +02:00
intc.c microblaze: Do not show error message for 32 interrupt lines 2011-07-27 11:02:00 +02:00
irq.c microblaze: Add export.h to arch/microblaze files as required 2011-10-31 19:31:06 -04:00
kgdb.c microblaze: KGDB little endian support 2010-10-21 15:51:58 +10:00
Makefile microblaze: Fix ftrace 2011-04-01 09:34:51 +02:00
mcount.S microblaze: ftrace: Add dynamic function graph tracer 2009-12-14 08:44:54 +01:00
microblaze_ksyms.c microblaze: Add missing export symbols for lib functions 2011-03-09 08:09:59 +01:00
misc.S microblaze: Fix comment for TLB 2010-08-02 10:44:03 +02:00
module.c modules: make arch's use default loader hooks 2011-07-24 22:06:04 +09:30
process.c nohz: Separate out irq exit and idle loop dyntick logic 2011-12-11 10:31:35 -08:00
prom_parse.c of/pci: move of_irq_map_pci() into generic code 2011-02-04 11:46:50 -07:00
prom.c microblaze: Add support for early console on mdm 2011-07-25 09:25:26 +02:00
ptrace.c microblaze: Switch ELF_ARCH code to 189 2011-10-14 12:24:31 +02:00
reset.c of/gpio: stop using device_node data pointer to find gpio_chip 2010-07-05 16:14:30 -06:00
selfmod.c microblaze_v8: Selfmodified code 2009-03-27 14:25:15 +01:00
setup.c microblaze: Get early printk console earlier 2011-07-25 09:23:47 +02:00
signal.c microblaze: Fix sparse warnings - signal.c 2011-03-09 08:09:59 +01:00
stacktrace.c microblaze: Add stack unwinder 2010-08-04 10:22:35 +02:00
sys_microblaze.c microblaze: Fix missing microblaze specific syscalls declaration 2011-03-09 08:09:58 +01:00
syscall_table.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
timer.c microblaze: Clear top bit from cnt32_to_63 2011-10-14 12:24:20 +02:00
traps.c microblaze: Add stack unwinder 2010-08-04 10:22:35 +02:00
unwind.c microblaze: Fix sparse warning - unwind.c 2011-03-09 08:09:58 +01:00
vmlinux.lds.S microblaze: Remove r0_ram pointer and PTO alignment 2011-03-09 08:09:54 +01:00