linux/arch/mips
Paul Burton 7daef8f261 MIPS: consistently clear MSA flags when starting & copying threads
The TIF_MSA_CTX_LIVE flag (indicating that a task has MSA context which
needs to be preserved) was being cleared in start_thread, but the
TIF_USEDMSA flag (indicating that a task has used MSA in this timeslice)
was not. In copy_thread neither flag was cleared, but both need to be.
Without clearing these flags the kernel will proceed to attempt to save
MSA context when the task is context switched out, and if the task had
not used MSA in the meantime then it will fail because MSA or the FPU
are disabled. The end result is typically:

  do_cpu invoked from kernel context![#1]:
  CPU: 0 PID: 99 Comm: sh Not tainted 3.16.0-rc4-00025-g6dc9476-dirty #88
  task: 8f23dc60 ti: 8f1d8000 task.ti: 8f1d8000
  ...
  Call Trace:
  [<8010edbc>] resume+0x5c/0x280
  [<80481e0c>] __schedule+0x370/0x800
  [<80104838>] work_resched+0x8/0x2c

Fix by consistently clearing both flags in both functions.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7309/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-08-02 00:06:45 +02:00
..
alchemy MIPS: Alchemy: remove old clock support 2014-07-30 14:12:00 +02:00
ar7 MIPS: Restore init.h usage to arch/mips/ar7/time.c 2014-03-26 23:09:23 +01:00
ath79 usb: host: remove selects of USB_ARCH_HAS_?HCI 2014-02-18 12:36:38 -08:00
bcm47xx MIPS: BCM47XX: Detect more then 128 MiB of RAM (HIGHMEM) 2014-07-30 23:27:02 +02:00
bcm63xx MIPS: BCM63xx: Allow setting affinity for IPIC 2014-07-30 15:30:23 +02:00
boot mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
cavium-octeon MIPS: OCTEON: add interface & port definitions for D-Link DSR-1000N 2014-08-02 00:06:43 +02:00
cobalt MIPS: Cobalt: Move to 8250/16550 serial early printk driver 2013-10-29 21:24:38 +01:00
configs MIPS: Loongson: Rename CONFIG_LEMOTE_MACH3A to CONFIG_LOONGSON_MACH3X 2014-07-30 21:47:33 +02:00
dec Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
emma MIPS: Remove panic_timeout settings 2013-11-26 12:12:27 +01:00
fw MIPS: DEC/SNI: O32 wrapper stack switching fixes 2014-05-13 00:29:35 +02:00
include MIPS: 16 byte align MSA vector context 2014-08-02 00:06:44 +02:00
jazz
jz4740 ASoC: qi_lb60: Use GPIO descriptor API 2014-04-23 12:18:36 +01:00
kernel MIPS: consistently clear MSA flags when starting & copying threads 2014-08-02 00:06:45 +02:00
kvm MIPS: KVM: Fix memory leak on VCPU 2014-06-25 14:17:03 +02:00
lantiq Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
lasat MIPS: Lasat: Replace del_timer by del_timer_sync 2014-03-31 18:17:12 +02:00
lib MIPS: __delay ABI-dependent subtraction simplification 2014-05-30 21:01:08 +02:00
loongson MIPS: Loongson: Rename CONFIG_LEMOTE_MACH3A to CONFIG_LOONGSON_MACH3X 2014-07-30 21:47:33 +02:00
loongson1 MIPS: Disable MIPS16/microMIPS crap for platforms not supporting these ASEs. 2014-05-23 15:12:37 +02:00
math-emu MIPS: math-emu: Reduce code duplication. 2014-06-26 10:47:55 +01:00
mm MIPS: Use dedicated exception handler if CPU supports RI/XI exceptions 2014-08-02 00:06:39 +02:00
mti-malta MIPS: Malta: Fix dispatching of GIC interrupts 2014-08-02 00:06:41 +02:00
mti-sead3 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
net MIPS: bpf: Fix stack space allocation for BPF memwords on MIPS64 2014-06-26 10:48:23 +01:00
netlogic Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-06-09 18:10:34 -07:00
oprofile MIPS: Add support for the M5150 processor 2014-03-26 23:09:22 +01:00
paravirt mips: Update the email address of Geert Uytterhoeven 2014-06-02 16:34:41 +02:00
pci MIPS: Loongson: Rename CONFIG_LEMOTE_MACH3A to CONFIG_LOONGSON_MACH3X 2014-07-30 21:47:33 +02:00
pmcs-msp71xx MIPS: MT: Remove SMTC support 2014-05-24 00:07:01 +02:00
pnx833x MIPS: PNX833x: Remove checks for CONFIG_I2C_PNX0105 2014-05-23 15:12:39 +02:00
power MIPS: Hibernate: Flush TLB entries in swsusp_arch_resume() 2014-03-31 10:16:53 +02:00
ralink MIPS: ralink: Use strlcpy to ensure string is always NUL-terminated. 2014-07-30 14:42:21 +02:00
rb532 MIPS: RB532: Replace parse_mac_addr() with mac_pton(). 2014-07-30 13:28:16 +02:00
sgi-ip22 MIPS: IP22/IP28: Improve GIO support 2014-06-04 22:50:42 +02:00
sgi-ip27 MIPS: SMP: Remove plat_smp_ops cpus_done method. 2014-05-27 11:06:42 +02:00
sgi-ip32
sibyte MIPS: SMP: Remove plat_smp_ops cpus_done method. 2014-05-27 11:06:42 +02:00
sni MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks 2013-09-18 20:25:19 +02:00
txx9 MIPS: TXx9: Add __init_refok annotation to quirk_slc90e66_bridge 2014-07-30 15:57:40 +02:00
vr41xx MIPS: Idle: Consolidate all declarations in <asm/idle.h>. 2013-05-22 01:34:27 +02:00
Kbuild MIPS: net: Add BPF JIT 2014-05-30 16:10:20 +02:00
Kbuild.platforms MIPS: Enable build for new system 'paravirt' 2014-06-02 12:34:20 +02:00
Kconfig MIPS: BCM47XX: Move shared symbols to the config BCM47XX 2014-07-30 22:17:21 +02:00
Kconfig.debug MIPS: MT: Remove SMTC support 2014-05-24 00:07:01 +02:00
Makefile MIPS: SB1: Check optional compilation flags one by one 2014-07-30 15:53:49 +02:00