]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/64s: Avoid cpabort in context switch when possible
authorNicholas Piggin <npiggin@gmail.com>
Thu, 8 Jun 2017 15:36:09 +0000 (01:36 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 15 Jun 2017 06:34:39 +0000 (16:34 +1000)
commit07d2a628bc0008f90754ac7982289f6cb0f46cf8
treefa8554770bf35735a791fd798a2dc3bd8ab45807
parent9145effd626d155484f73db24ab3e142ecda31db
powerpc/64s: Avoid cpabort in context switch when possible

The ISA v3.0B copy-paste facility only requires cpabort when switching
to a process that has foreign real addresses mapped (direct access to
accelerators), to clear a potential copy buffer filled by a previous
thread. There is no accelerator driver implemented yet, so cpabort can
be removed. It can be be re-added when a driver is implemented.

POWER9 DD1 requires the copy buffer to always be cleared on context
switch, but if accelerators are not in use, then an unpaired copy from
a dummy region is sufficient to clear data out of the copy buffer.

This increases context switch performance by about 5% on POWER9.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/process.c