powerpc: Fix bug causing FP registers corruption on UP + preempt
commit48abec07cf8063184d397560a6a5f27eaf9caddf
authorPaul Mackerras <paulus@samba.org>
Wed, 30 Nov 2005 02:20:54 +0000 (30 13:20 +1100)
committerPaul Mackerras <paulus@samba.org>
Wed, 30 Nov 2005 02:20:54 +0000 (30 13:20 +1100)
treec96acc7a1176d1848d4c8c9f623f8ed39a1f63de
parent8117ce76c28ef0cab8545b518fa0543f6d1437e6
powerpc: Fix bug causing FP registers corruption on UP + preempt

This fixes a bug noticed by Paolo Galtieri and fixed for ARCH=ppc in
the previous commit (ppc: fix floating point register corruption).
This fixes the arch/powerpc code by adding preempt_disable/enable,
and also cleans it up a bit by pulling out the code that discards
any lazily-switched CPU register state into a new function, rather
than having that code repeated in three places.

Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/process.c