Skip to content
Commit 0492747c authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Catalin Marinas
Browse files

arm64: KVM: Invoke compute_layout() before alternatives are applied



compute_layout() is invoked as part of an alternative fixup under
stop_machine(). This function invokes get_random_long() which acquires a
sleeping lock on -RT which can not be acquired in this context.

Rename compute_layout() to kvm_compute_layout() and invoke it before
stop_machine() applies the alternatives. Add a __init prefix to
kvm_compute_layout() because the caller has it, too (and so the code can be
discarded after boot).

Reviewed-by: default avatarJames Morse <james.morse@arm.com>
Acked-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent df325e05
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment