kernel_optimize_test/arch/powerpc
Cyril Bur dc16b553c9 powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use
Comment from arch/powerpc/kernel/process.c:967:
 If userspace is inside a transaction (whether active or
 suspended) and FP/VMX/VSX instructions have ever been enabled
 inside that transaction, then we have to keep them enabled
 and keep the FP/VMX/VSX state loaded while ever the transaction
 continues.  The reason is that if we didn't, and subsequently
 got a FP/VMX/VSX unavailable interrupt inside a transaction,
 we don't know whether it's the same transaction, and thus we
 don't know which of the checkpointed state and the ransactional
 state to use.

restore_math() restore_fp() and restore_altivec() currently may not
restore the registers. It doesn't appear that this is more serious
than a performance penalty. If the math registers aren't restored the
userspace thread will still be run with the facility disabled.
Userspace will not be able to read invalid values. On the first access
it will take an facility unavailable exception and the kernel will
detected an active transaction, at which point it will abort the
transaction. There is the possibility for a pathological case
preventing any progress by transactions, however, transactions
are never guaranteed to make progress.

Fixes: 70fe3d9 ("powerpc: Restore FPU/VEC/VSX if previously used")
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-10-04 16:43:05 +11:00
..
boot powerpc/boot: Add support for XZ compression 2016-09-28 14:35:14 +10:00
configs powerpc/configs: Enable Intel i40e on 64 bit configs 2016-10-04 16:10:56 +11:00
crypto crypto: crc32c-vpmsum - Convert to CPU feature based module autoloading 2016-08-09 14:50:17 +10:00
include powerpc/powernv: Specify proper data type for PCI_SLOT_ID_PREFIX 2016-10-04 16:29:46 +11:00
kernel powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use 2016-10-04 16:43:05 +11:00
kvm powerpc: move hmi.c to arch/powerpc/kvm/ 2016-08-22 11:09:33 +10:00
lib powerpc/64: Align hot loops of memset() and backwards_memcpy() 2016-10-04 16:08:19 +11:00
math-emu
mm KVM: PPC: Book3S HV: Migrate pinned pages out of CMA 2016-09-29 15:14:44 +10:00
net powerpc/ebpf/jit: Implement JIT compiler for extended BPF 2016-06-24 15:17:57 +10:00
oprofile powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
perf powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
platforms powerpc/powernv: Fix data type for @r in pnv_ioda_parse_m64_window() 2016-10-04 16:30:28 +11:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
xmon powerpc/xmon: Don't use ld on 32-bit 2016-09-13 17:37:02 +10:00
Kconfig powerpc: Only disable HAVE_EFFICIENT_UNALIGNED_ACCESS on POWER7 little endian 2016-10-04 16:15:00 +11:00
Kconfig.debug powerpc/mm: Catch usage of cpu/mmu_has_feature() before jump label init 2016-08-01 11:15:06 +10:00
Makefile powerpc/Makefile: Construct the UTS_MACHINE value more concisely 2016-09-13 17:37:06 +10:00
relocs_check.sh