linux_old1/arch/mips/lib
Jim Quinlan e97c5b6098 MIPS: Make irqflags.h functions preempt-safe for non-mipsr2 cpus
For non MIPSr2 processors, such as the BMIPS 5000, calls to
arch_local_irq_disable() and others may be preempted, and in doing
so a stale value may be restored to c0_status.  This fix disables
preemption for such processors prior to the call and enables it
after the call.

Those functions that needed this fix have been "outlined" to
mips-atomic.c, as they are no longer good candidates for inlining.

This bug was observed in a BMIPS 5000, occuring once every few hours
in a continuous reboot test.  It was traced to the write_lock_irq()
function which was being invoked in release_task() in exit.c.
By placing a number of "nops" inbetween the mfc0/mtc0 pair in
arch_local_irq_disable(), which is called by write_lock_irq(), we
were able to greatly increase the occurance of this bug.  Similarly,
the application of this commit silenced the bug.

Signed-off-by: Jim Quinlan <jim2101024@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: Kevin Cernekee cernekee@gmail.com
Cc: Jim Quinlan <jim2101024@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/4321/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-11-09 10:59:21 +01:00
..
Makefile MIPS: Make irqflags.h functions preempt-safe for non-mipsr2 cpus 2012-11-09 10:59:21 +01:00
ashldi3.c [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
ashrdi3.c [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
bitops.c MIPS: Remove irqflags.h dependency from bitops.h 2012-11-09 10:59:10 +01:00
cmpdi2.c [MIPS] Add __cmpdi2 2007-08-27 02:17:00 +01:00
csum_partial.S MIPS: IP checksums: Optimize adjust of sum on buffers of odd alignment. 2008-10-11 16:18:53 +01:00
delay.c MIPS: Make __{,n,u}delay declarations match definitions and generic delay.h 2012-10-16 22:20:03 +02:00
dump_tlb.c MIPS: Restore pagemask after dumping the TLB. 2012-10-17 01:01:20 +02:00
iomap-pci.c mips: use the the PCI controller's io_map_base 2012-01-31 23:20:30 +02:00
iomap.c PCI: Cleanup the includes of <linux/pci.h> 2007-05-02 19:02:35 -07:00
libgcc.h MIPS: libgcc.h: Checkpatch cleanup 2010-04-12 17:26:15 +01:00
lshrdi3.c [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
memcpy.S MIPS: Unify memcpy.S and memcpy-inatomic.S 2012-07-23 13:55:55 +01:00
memset.S MIPS: Separate two consecutive loads in memset.S 2010-12-16 18:10:57 +00:00
mips-atomic.c MIPS: Make irqflags.h functions preempt-safe for non-mipsr2 cpus 2012-11-09 10:59:21 +01:00
r3k_dump_tlb.c [MIPS] Cleanup tlbdebug.h 2007-07-12 17:41:11 +01:00
strlen_user.S [MIPS] Eleminate local symbols from the symbol table. 2008-01-29 10:14:59 +00:00
strncpy_user.S [MIPS] Eleminate local symbols from the symbol table. 2008-01-29 10:14:59 +00:00
strnlen_user.S Fix common misspellings 2011-03-31 11:26:23 -03:00
ucmpdi2.c [MIPS] Export __ucmpdi2 to modules. 2008-03-12 14:14:41 +00:00
uncached.c [MIPS] Fix loads of section missmatches 2008-03-12 14:14:41 +00:00