mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
e97c5b6098
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>
17 lines
480 B
Makefile
17 lines
480 B
Makefile
#
|
|
# Makefile for MIPS-specific library files..
|
|
#
|
|
|
|
lib-y += bitops.o csum_partial.o delay.o memcpy.o memset.o \
|
|
mips-atomic.o strlen_user.o strncpy_user.o \
|
|
strnlen_user.o uncached.o
|
|
|
|
obj-y += iomap.o
|
|
obj-$(CONFIG_PCI) += iomap-pci.o
|
|
|
|
obj-$(CONFIG_CPU_GENERIC_DUMP_TLB) += dump_tlb.o
|
|
obj-$(CONFIG_CPU_R3000) += r3k_dump_tlb.o
|
|
obj-$(CONFIG_CPU_TX39XX) += r3k_dump_tlb.o
|
|
|
|
# libgcc-style stuff needed in the kernel
|
|
obj-y += ashldi3.o ashrdi3.o cmpdi2.o lshrdi3.o ucmpdi2.o
|