summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/code-patching.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2019-04-22 00:20:26 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-16 19:44:49 +0200
commitbda04af8692dc2ac7e131fc5057754619fc9929c (patch)
tree695a7e009ec8591800f10ff461ac01f9d20b7fea /arch/powerpc/lib/code-patching.c
parentbfeafa01fa09da6357ffa2e1b9a613187c3e843f (diff)
powerpc/64s: Add support for software count cache flush
commit ee13cb249fabdff8b90aaff61add347749280087 upstream. Some CPU revisions support a mode where the count cache needs to be flushed by software on context switch. Additionally some revisions may have a hardware accelerated flush, in which case the software flush sequence can be shortened. If we detect the appropriate flag from firmware we patch a branch into _switch() which takes us to a count cache flush sequence. That sequence in turn may be patched to return early if we detect that the CPU supports accelerating the flush sequence in hardware. Add debugfs support for reporting the state of the flush, as well as runtime disabling it. And modify the spectre_v2 sysfs file to report the state of the software flush. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions