]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen:arm: we never get into schedule_tail() with prev==current
authorAndrii Anisov <andrii_anisov@epam.com>
Wed, 8 May 2019 09:59:38 +0000 (12:59 +0300)
committerJulien Grall <julien.grall@arm.com>
Thu, 16 May 2019 15:47:09 +0000 (16:47 +0100)
ARM's schedule_tail() is called from two places: context_switch() and
continue_new_vcpu(). Both functions are always called with
prev!=current. So replace the correspondent check in schedule_tail()
with ASSERT() which is the development (debug) build guard.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/domain.c

index 915ae0b4c6753c36fee6d201fe88bb3813721779..ff330b35e607f262ca19506858736b1029650a30 100644 (file)
@@ -305,6 +305,8 @@ static void update_runstate_area(struct vcpu *v)
 
 static void schedule_tail(struct vcpu *prev)
 {
+    ASSERT(prev != current);
+
     ctxt_switch_from(prev);
 
     ctxt_switch_to(current);
@@ -313,8 +315,7 @@ static void schedule_tail(struct vcpu *prev)
 
     context_saved(prev);
 
-    if ( prev != current )
-        update_runstate_area(current);
+    update_runstate_area(current);
 
     /* Ensure that the vcpu has an up-to-date time base. */
     update_vcpu_system_time(current);