]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
arm64: alternative: put secondary CPUs into polling loop during patch
authorWill Deacon <will.deacon@arm.com>
Tue, 28 Jul 2015 18:07:28 +0000 (19:07 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 30 Jul 2015 18:07:28 +0000 (19:07 +0100)
commitef5e724b25c9f90b7683bb2d45833ebac0989dcb
treeba29fb37e3442b0bba787ed1edbb23c7b30f45d6
parent6c020ea8dc3a8adee81b6f141428a7a75249706e
arm64: alternative: put secondary CPUs into polling loop during patch

When patching the kernel text with alternatives, we may end up patching
parts of the stop_machine state machine (e.g. atomic_dec_and_test in
ack_state) and consequently corrupt the instruction stream of any
secondary CPUs.

This patch passes the cpu_online_mask to stop_machine, forcing all of
the CPUs into our own callback which can place the secondary cores into
a dumb (but safe!) polling loop whilst the patching is carried out.

Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/alternative.h
arch/arm64/kernel/alternative.c