[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level
commit f5c842bf6364541151923d488211ec1bc50d25e0 Author: Eric DeVolder <eric.devolder@xxxxxxxxxx> AuthorDate: Wed Apr 19 16:01:49 2017 -0500 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Apr 20 18:11:36 2017 +0100 xen/kexec: remove spinlock now that all KEXEC hypercall ops are protected at the top-level The spinlock in kexec_swap_images() was removed as this function is only reachable on the kexec hypercall, which is now protected at the top-level in do_kexec_op_internal(), thus the local spinlock is no longer necessary. Signed-off-by: Eric DeVolder <eric.devolder@xxxxxxxxxx> Reviewed-by: Bhavesh Davda <bhavesh.davda@xxxxxxxxxx> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx> Release-acked-by: Julien Grall <julien.grall@xxxxxxx> --- xen/common/kexec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/common/kexec.c b/xen/common/kexec.c index d6568e3..fbca8a6 100644 --- a/xen/common/kexec.c +++ b/xen/common/kexec.c @@ -820,7 +820,6 @@ static int kexec_exec(XEN_GUEST_HANDLE_PARAM(void) uarg) static int kexec_swap_images(int type, struct kexec_image *new, struct kexec_image **old) { - static DEFINE_SPINLOCK(kexec_lock); int base, bit, pos; int new_slot, old_slot; @@ -832,7 +831,7 @@ static int kexec_swap_images(int type, struct kexec_image *new, if ( kexec_load_get_bits(type, &base, &bit) ) return -EINVAL; - spin_lock(&kexec_lock); + ASSERT(test_bit(KEXEC_FLAG_IN_HYPERCALL, &kexec_flags)); pos = (test_bit(bit, &kexec_flags) != 0); old_slot = base + pos; @@ -846,8 +845,6 @@ static int kexec_swap_images(int type, struct kexec_image *new, clear_bit(old_slot, &kexec_flags); *old = kexec_image[old_slot]; - spin_unlock(&kexec_lock); - return 0; } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |