Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xen/preempt: use need_resched() instead of should_resched()

This code is used only when CONFIG_PREEMPT=n and only in non-atomic
context: xen_in_preemptible_hcall is set only in
privcmd_ioctl_hypercall(). Thus preempt_count is zero and
should_resched() is equal to need_resched().

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>

authored by

Konstantin Khlebnikov and committed by
David Vrabel
a7da51ae 772f95e3

+1 -1
+1 -1
drivers/xen/preempt.c
··· 31 31 asmlinkage __visible void xen_maybe_preempt_hcall(void) 32 32 { 33 33 if (unlikely(__this_cpu_read(xen_in_preemptible_hcall) 34 - && should_resched())) { 34 + && need_resched())) { 35 35 /* 36 36 * Clear flag as we may be rescheduled on a different 37 37 * cpu.