]> git.karo-electronics.de Git - linux-beck.git/commit
powerpc: tm: Enable transactional memory (TM) lazily for userspace
authorCyril Bur <cyrilbur@gmail.com>
Wed, 14 Sep 2016 08:02:16 +0000 (18:02 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 4 Oct 2016 09:33:17 +0000 (20:33 +1100)
commit5d176f751ee3c6eededd984ad409bff201f436a7
treec760a51812c2cfd6c27fccf9bd0f4d303e984509
parent172f7aaa75d0eaae167edde25c08aae9059e80fc
powerpc: tm: Enable transactional memory (TM) lazily for userspace

Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.

For processes that don't use TM the TM MSR bit can be turned off
allowing the kernel to avoid the expensive swap of the TM registers.

A TM unavailable exception will occur if a thread does use TM and the
kernel will enable MSR_TM and leave it so for some time afterwards.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/processor.h
arch/powerpc/kernel/process.c
arch/powerpc/kernel/traps.c