scheduler: refine make_reschedule_request

just use pcpu_id for make_reschedule_request is enough

Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <edide.dong@intel.com>
This commit is contained in:
Jason Chen CJ
2018-12-20 13:09:58 +08:00
committed by wenlingz
parent 6d67364881
commit 8aae0dff87
3 changed files with 8 additions and 8 deletions

View File

@@ -106,13 +106,13 @@ static struct acrn_vcpu *select_next_vcpu(uint16_t pcpu_id)
return vcpu;
}
void make_reschedule_request(const struct acrn_vcpu *vcpu)
void make_reschedule_request(uint16_t pcpu_id)
{
struct sched_context *ctx = &per_cpu(sched_ctx, vcpu->pcpu_id);
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
bitmap_set_lock(NEED_RESCHEDULE, &ctx->flags);
if (get_cpu_id() != vcpu->pcpu_id) {
send_single_ipi(vcpu->pcpu_id, VECTOR_NOTIFY_VCPU);
if (get_cpu_id() != pcpu_id) {
send_single_ipi(pcpu_id, VECTOR_NOTIFY_VCPU);
}
}