]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix register clobbering when accumulating stolen time
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 2 Mar 2012 00:01:31 +0000 (11:01 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 8 Mar 2012 23:55:16 +0000 (10:55 +1100)
commit9e939e3918896c6fafab3ab337c8b1ec24bb80ef
treec34310e6d49cffa38d242270e58f661dd90a575d
parentc5a3c1d65babb185317e4ebfa9385f1289caf0de
powerpc: Fix register clobbering when accumulating stolen time

When running under a hypervisor that supports stolen time accounting,
we may call C code from the macro EXCEPTION_PROLOG_COMMON in the
exception entry path, which clobbers CR0.

However, the FPU and vector traps rely on CR0 indicating whether we
are coming from userspace or kernel to decide what to do.

So we need to restore that value after the C call

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/ppc_asm.h