mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: remove unused pcpu assignment functions
As we introduced vcpu_affinity[] to assign vcpus to different pcpus, the old policy and functions are not needed. Remove them. Tracked-On: #3663 Signed-off-by: Conghui Chen <conghui.chen@intel.com> Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
1c526e6d16
commit
9a23ec6b5a
@@ -13,8 +13,6 @@
|
||||
#include <schedule.h>
|
||||
#include <sprintf.h>
|
||||
|
||||
static uint64_t pcpu_used_bitmap;
|
||||
|
||||
void init_scheduler(void)
|
||||
{
|
||||
struct sched_context *ctx;
|
||||
@@ -43,32 +41,6 @@ void release_schedule_lock(uint16_t pcpu_id)
|
||||
spinlock_release(&ctx->scheduler_lock);
|
||||
}
|
||||
|
||||
uint16_t allocate_pcpu(void)
|
||||
{
|
||||
uint16_t i;
|
||||
uint16_t ret = INVALID_CPU_ID;
|
||||
uint16_t pcpu_nums = get_pcpu_nums();
|
||||
|
||||
for (i = 0U; i < pcpu_nums; i++) {
|
||||
if (bitmap_test_and_set_lock(i, &pcpu_used_bitmap) == 0) {
|
||||
ret = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void set_pcpu_used(uint16_t pcpu_id)
|
||||
{
|
||||
bitmap_set_lock(pcpu_id, &pcpu_used_bitmap);
|
||||
}
|
||||
|
||||
void free_pcpu(uint16_t pcpu_id)
|
||||
{
|
||||
bitmap_clear_lock(pcpu_id, &pcpu_used_bitmap);
|
||||
}
|
||||
|
||||
void add_to_cpu_runqueue(struct sched_object *obj, uint16_t pcpu_id)
|
||||
{
|
||||
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
|
||||
|
Reference in New Issue
Block a user