kernel-fxtec-pro1x/arch/sparc/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
..
.gitignore
apc.c sparc: Add module.h to files previously implicitly using it. 2011-10-31 19:30:54 -04:00
asm-offsets.c
audit.c
auxio_32.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
auxio_64.c sparc64: Fix section mis-match errors. 2011-03-30 17:37:56 -07:00
btext.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
central.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
cherrs.S
chmc.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
compat_audit.c
cpu.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
cpumap.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
cpumap.h
devices.c sparc32: always register a PROM based early console 2011-04-21 15:47:35 -07:00
dma.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
ds.c sparc: Don't do hypervisor calls on non-sun4v in DS driver. 2011-08-11 17:58:59 -07:00
dtlb_miss.S
dtlb_prot.S
ebus.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
entry.h sparc64: Patch sun4v code sequences properly on module load. 2011-11-17 22:44:58 -08:00
entry.S sparc: sun4m SMP: fix wrong shift instruction in IPI handler 2011-07-16 10:45:12 -07:00
etrap_32.S
etrap_64.S
fpu_traps.S
ftrace.c
getsetcc.S
head_32.S sparc32,leon: operate on boot-cpu IRQ controller registers 2011-04-21 16:44:45 -07:00
head_64.S sparc64: Future proof Niagara cpu detection. 2011-09-16 14:21:33 -07:00
helpers.S
hvapi.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
hvcalls.S sparc: Set reboot-cmd using reboot data hypervisor call if available. 2011-08-02 21:28:52 -07:00
hvtramp.S
idprom.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
init_task.c Fix common misspellings 2011-03-31 11:26:23 -03:00
iommu.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
iommu_common.h
ioport.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2011-07-31 14:30:59 -10:00
irq.h sparc32,sun4d: Change IPI IRQ level to prevent collision between IPI and timer interrupt 2011-08-29 09:20:40 -07:00
irq_32.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
irq_64.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
itlb_miss.S
ivec.S
jump_label.c sparc/jump_label: drop arch_jump_label_text_poke_early() 2011-10-25 11:54:26 -07:00
kernel.h sparc: Set reboot-cmd using reboot data hypervisor call if available. 2011-08-02 21:28:52 -07:00
kgdb_32.c
kgdb_64.c
kprobes.c
kstack.h
ktlb.S sparc: Access kernel TSB using physical addressing when possible. 2011-08-05 00:53:57 -07:00
ldc.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
led.c
leon_kernel.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
leon_pci.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
leon_pci_grpci2.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
leon_pmc.c
leon_smp.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
Makefile sparc: Allow handling signals when stack is corrupted. 2011-08-20 17:14:54 -07:00
mdesc.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
misctrap.S
module.c sparc64: Patch sun4v code sequences properly on module load. 2011-11-17 22:44:58 -08:00
muldiv.c
nmi.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
of_device_32.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
of_device_64.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
of_device_common.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
of_device_common.h
pci.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
pci_common.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
pci_fire.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
pci_impl.h
pci_msi.c sparc: convert old cpumask API into new one 2011-05-16 13:38:07 -07:00
pci_psycho.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
pci_sabre.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
pci_schizo.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
pci_sun4v.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
pci_sun4v.h
pci_sun4v_asm.S
pcic.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
pcr.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
perf_event.c sparc: Detect and handle UltraSPARC-T3 cpu types. 2011-07-27 22:10:10 -07:00
pmc.c sparc: Add module.h to files previously implicitly using it. 2011-10-31 19:30:54 -04:00
power.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
process_32.c sparc, exec: remove redundant addr_limit assignment 2011-09-20 23:12:42 -07:00
process_64.c nohz: Separate out irq exit and idle loop dyntick logic 2011-12-11 10:31:35 -08:00
prom.h
prom_32.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
prom_64.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
prom_common.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
prom_irqtrans.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
psycho_common.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
psycho_common.h
ptrace_32.c
ptrace_64.c
reboot.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
rtrap_32.S
rtrap_64.S
sbus.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
setup_32.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
setup_64.c sparc64: Patch sun4v code sequences properly on module load. 2011-11-17 22:44:58 -08:00
signal32.c sparc: Stash orig_i0 into %g6 instead of %g2 2011-11-15 12:57:00 -08:00
signal_32.c sparc: Stash orig_i0 into %g6 instead of %g2 2011-11-15 12:57:00 -08:00
signal_64.c sparc: Stash orig_i0 into %g6 instead of %g2 2011-11-15 12:57:00 -08:00
sigutil.h sparc: Allow handling signals when stack is corrupted. 2011-08-20 17:14:54 -07:00
sigutil_32.c sparc: Allow handling signals when stack is corrupted. 2011-08-20 17:14:54 -07:00
sigutil_64.c sparc: sigutil: Include <linux/errno.h> 2011-11-13 20:53:25 -08:00
smp_32.c atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
smp_64.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
sparc_ksyms_32.c
sparc_ksyms_64.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
spiterrs.S
sstate.c sparc: Set reboot-cmd using reboot data hypervisor call if available. 2011-08-02 21:28:52 -07:00
stacktrace.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
starfire.c
sun4c_irq.c sparc32: genirq support 2011-04-19 22:11:40 -07:00
sun4d_irq.c Add support for allocating irqs for bootbus devices 2011-06-07 16:06:33 -07:00
sun4d_smp.c sparc: convert old cpumask API into new one 2011-05-16 13:38:07 -07:00
sun4m_irq.c sparc32: genirq support 2011-04-19 22:11:40 -07:00
sun4m_smp.c sparc: convert old cpumask API into new one 2011-05-16 13:38:07 -07:00
sun4v_ivec.S
sun4v_tlb_miss.S
sys32.S All Arch: remove linkage for sys_nfsservctl system call 2011-08-26 15:09:58 -07:00
sys_sparc32.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
sys_sparc_32.c
sys_sparc_64.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
syscalls.S
sysfs.c sparc: convert old cpumask API into new one 2011-05-16 13:38:07 -07:00
systbls.h
systbls_32.S sparc: Hook up process_vm_{readv,writev} syscalls. 2011-11-01 00:51:30 -07:00
systbls_64.S sparc: Hook up process_vm_{readv,writev} syscalls. 2011-11-01 00:51:30 -07:00
tadpole.c
time_32.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2011-05-20 12:59:54 -07:00
time_64.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
trampoline_32.S
trampoline_64.S
traps_32.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
traps_64.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
tsb.S
ttable.S
una_asm_32.S
una_asm_64.S sparc: Fix .size directive for do_int_load 2011-03-16 18:19:15 -07:00
unaligned_32.c sparc: remove several unnecessary module.h include instances 2011-10-31 19:30:54 -04:00
unaligned_64.c sparc: Use hweight64() in popc emulation. 2011-08-02 21:28:50 -07:00
us2e_cpufreq.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
us3_cpufreq.c sparc: Remove unnecessary semicolons 2011-06-07 16:06:34 -07:00
utrap.S
vio.c sparc: add export.h to arch/sparc files as required 2011-10-31 19:30:52 -04:00
viohs.c sparc: move symbol exporters to use export.h not module.h 2011-10-31 19:30:53 -04:00
visemul.c sparc64: Fix masking and shifting in VIS fpcmp emulation. 2011-10-31 01:05:49 -07:00
vmlinux.lds.S sparc: Access kernel TSB using physical addressing when possible. 2011-08-05 00:53:57 -07:00
windows.c
winfixup.S
wof.S
wuf.S