powerpc/tm: Switch out userspace PPR and DSCR sooner
authorMichael Neuling <mikey@neuling.org>
Thu, 26 Sep 2013 03:29:09 +0000 (13:29 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Oct 2013 01:14:28 +0000 (18:14 -0700)
commit39302163d7368f0960f30cf7d785eec2ccae1c26
tree4734779956b66b2fd7aa8950c59a00197cf3e812
parentee4801ffed249525a8080581fdd6380f324c6086
powerpc/tm: Switch out userspace PPR and DSCR sooner

commit e9bdc3d6143d1c4b8d8ce5231fc958268331f983 upstream.

When we do a treclaim or trecheckpoint we end up running with userspace
PPR and DSCR values.  Currently we don't do anything special to avoid
running with user values which could cause a severe performance
degradation.

This patch moves the PPR and DSCR save and restore around treclaim and
trecheckpoint so that we run with user values for a much shorter period.
More care is taken with the PPR as it's impact is greater than the DSCR.

This is similar to user exceptions, where we run HTM_MEDIUM early to
ensure that we don't run with a userspace PPR values in the kernel.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/tm.S