mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-14 19:02:02 +00:00
hv: refine make_reschedule_request in schedule module
add arch_send_reschedule_request, which is called by make_reschedule_request, for X86 arch_send_reschedule_request will call kick_pcpu, arch_send_reschedule_request is arch public API, which is needed to be implemented by each architecture. Tracked-On: #8812 Signed-off-by: Xue Bosheng <bosheng.xue@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
committed by
acrnsi-robot
parent
6abe2e950c
commit
974e8c63ea
@@ -15,6 +15,7 @@
|
||||
#include <asm/guest/vm.h>
|
||||
#include <asm/guest/virq.h>
|
||||
#include <common/notify.h>
|
||||
#include <schedule.h>
|
||||
#include <irq.h>
|
||||
#include <logmsg.h>
|
||||
|
||||
@@ -96,3 +97,8 @@ void arch_smp_call_kick_pcpu(uint16_t pcpu_id)
|
||||
send_single_ipi(pcpu_id, NOTIFY_VCPU_VECTOR);
|
||||
}
|
||||
}
|
||||
|
||||
void arch_send_reschedule_request(uint16_t pcpu_id)
|
||||
{
|
||||
kick_pcpu(pcpu_id);
|
||||
}
|
||||
|
||||
@@ -7,12 +7,11 @@
|
||||
#include <rtl.h>
|
||||
#include <list.h>
|
||||
#include <bits.h>
|
||||
#include <asm/cpu.h>
|
||||
#include <cpu.h>
|
||||
#include <per_cpu.h>
|
||||
#include <asm/lapic.h>
|
||||
#include <schedule.h>
|
||||
#include <sprintf.h>
|
||||
#include <asm/irq.h>
|
||||
#include <irq.h>
|
||||
#include <trace.h>
|
||||
|
||||
bool is_idle_thread(const struct thread_object *obj)
|
||||
@@ -155,7 +154,7 @@ void make_reschedule_request(uint16_t pcpu_id)
|
||||
|
||||
bitmap_set(NEED_RESCHEDULE, &ctl->flags);
|
||||
if (get_pcpu_id() != pcpu_id) {
|
||||
kick_pcpu(pcpu_id);
|
||||
arch_send_reschedule_request(pcpu_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ void wake_thread(struct thread_object *obj);
|
||||
void yield_current(void);
|
||||
void schedule(void);
|
||||
|
||||
void arch_send_reschedule_request(uint16_t pcpu_id);
|
||||
void arch_switch_to(void *prev_sp, void *next_sp);
|
||||
void run_idle_thread(void);
|
||||
#endif /* SCHEDULE_H */
|
||||
|
||||
Reference in New Issue
Block a user