arm64: alternatives: hoist print out of __apply_alternatives()
authorMark Rutland <mark.rutland@arm.com>
Mon, 12 Sep 2022 16:22:06 +0000 (17:22 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Sep 2022 16:15:03 +0000 (17:15 +0100)
commitc5ba03260c7afad6977654d6bc7fcabbcd35c379
tree609aec69637cc46a28bea8f43c168984481f8973
parent747ad8d557645b8c9adb83334a620426e4c9d60f
arm64: alternatives: hoist print out of __apply_alternatives()

Printing in the middle of __apply_alternatives() is potentially unsafe
and not all that helpful given these days we practically always patch
*something*.

Hoist the print out of __apply_alternatives(), and add separate prints
to __apply_alternatives() and apply_alternatives_all(), which will make
it easier to spot if either patching call goes wrong.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: James Morse <james.morse@arm.com>
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220912162210.3626215-5-mark.rutland@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/alternative.c