powerpc/security: split branch cache flush toggle from code patching
authorNicholas Piggin <npiggin@gmail.com>
Tue, 9 Jun 2020 07:06:07 +0000 (17:06 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Jul 2020 03:12:32 +0000 (13:12 +1000)
commitc0036549a9d9a060fa8bc24e31f85503ce08ad5e
treeb504725cad337b5355d4bcbae8b2fc33ef48f94f
parent1afe00c74ffe6d502bffa81c7d849cb4640d7ae5
powerpc/security: split branch cache flush toggle from code patching

Branch cache flushing code patching has inter-dependencies on both the
link stack and the count cache flushing state.

To make the code clearer and to separate the link stack and count
cache handling, split the "toggle" (setting up variables and printing
enable/disable) from the code patching.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Always print something, even if the flush is disabled]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200609070610.846703-5-npiggin@gmail.com
arch/powerpc/kernel/security.c