xen/sched: we never get into context_switch() with prev==next
authorDario Faggioli <dfaggioli@suse.com>
Sat, 20 Apr 2019 15:24:47 +0000 (17:24 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 May 2019 09:35:37 +0000 (10:35 +0100)
commit508bc75d9582897d0541aad64b6cdf9fa2ecdf89
tree8f5000ca89931e42d05aa1c83b7b099e27bead8c
parentb12fec4a125950240573ea32f65c61fb9afa74c3
xen/sched: we never get into context_switch() with prev==next

In schedule(), if we pick, as the next vcpu to run (next) the same one
that is running already (prev), we never get to call context_switch().

We can, therefore, get rid of all the `if`-s testing prev and next being
different, trading them with an ASSERT() (on ARM, the ASSERT() was even
already there!)

Suggested-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrii Anisov <andrii_anisov@epam.com>
xen/arch/arm/domain.c
xen/arch/x86/domain.c