On Fri, May 22, 2015 at 11:37:34AM -0700, Leonid Yegoshin wrote:All 3 patches seems working (I tested), but if you don't like mine then I prefer Paul's patch more - it concentrates stuff more closely and removes some assembly stuff.
On 05/22/2015 02:38 AM, Ralf Baechle wrote:Ah sorry I now see that your added code is not executed for all CPUs but
Just move the call to finish_arch_switch().It might be a problem later, then a correct MSA partiton starts working. It
should be tight to saving MSA registers in that case.
Your rewrite also dropped the if (cpu_has_msa) condition fromRight before this chunk of code there is a saving MSA registers. Does it
disable_msa() probably causing havoc on lots of CPUs which will likely not
decode the set bits of the MFC0/MTC0 instructions thus end up accessing
Config0. Ralf
causing a havoc or else?
May I ask you to look into switch_to macro to figure out how "if
(cpu_has_msa)" check works in this case?
only those having MSA. So then it's safe.
Still I don't stylistically like defining the register t4 in the middle
of the code.
Below my suggested patch. It's advantage is that for non-MSA platforms
the call to disable_msa() will be removed entirely.
Something like Paul's http://patchwork.linux-mips.org/patch/10111/ (assuming
it's correct and tested) seems like a full cleanup but it's way too
complex for 4.1 or the stable kernels.
Ralf