On Wed, 9 May 2012, Matt Turner wrote: > > NAK, it's all pretty and nice, but I am afraid you're missing the point > > with your change. The bit has its purpose, the MDMX accumulator has to be > > saved and restored -- just as the DSP or the FPU context -- between task > > switches and the bit provides for doing that lazily (of course you can do > > that eagerly instead if you like). > > Okay. It looks like I also need to add save/restoring of the MDMX > accumulator to arch/mips/power/cpu.c and > arch/mips/include/asm/switch_to.h:finish_arch_switch()? More or less, though I think you want to switch the MDMX state lazily as it's tied to the FPU -- MDMX instructions require CP0.Status.CU1 to be set to execute; it's implementation dependent whether you'll get a Coprocessor Unusable or an MDMX Unusable exception when CP0.Status.CU1 and CP0.Status.MX are both zero and an MDMX instruction is executed. And moving the MDMX state every time will be wasting processor's time as nothing is going to use it (apart from the app you intend to write, I presume ;) ). Then there's stuff like ptrace(2), signal frames, perhaps more -- to say nothing of the userland side -- for full support. Maciej