From ebf5c5eb5d654e73d02b40ca1e66551119439f3b Mon Sep 17 00:00:00 2001 From: "Li, Fei1" Date: Tue, 2 Jul 2019 21:51:34 +0800 Subject: [PATCH] hv: cpu: remove CPU up count Since there's no one uses it. Tracked-On: #1842 Signed-off-by: Li, Fei1 Acked-by: Eddie Dong --- hypervisor/arch/x86/cpu.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/hypervisor/arch/x86/cpu.c b/hypervisor/arch/x86/cpu.c index 6e2282c2c..fc0cc752a 100644 --- a/hypervisor/arch/x86/cpu.c +++ b/hypervisor/arch/x86/cpu.c @@ -34,7 +34,6 @@ struct per_cpu_region per_cpu_data[CONFIG_MAX_PCPU_NUM] __aligned(PAGE_SIZE); static uint16_t phys_cpu_num = 0U; static uint64_t pcpu_sync = 0UL; -static uint16_t up_count = 0U; static uint64_t startup_paddr = 0UL; /* physical cpu active bitmap, support up to 64 cpus */ @@ -72,18 +71,11 @@ static void pcpu_set_current_state(uint16_t pcpu_id, enum pcpu_boot_state state) { /* Check if state is initializing */ if (state == PCPU_STATE_INITIALIZING) { - /* Increment CPU up count */ - atomic_inc16(&up_count); /* Save this CPU's logical ID to the TSC AUX MSR */ set_current_pcpu_id(pcpu_id); } - /* If cpu is dead, decrement CPU up count */ - if (state == PCPU_STATE_DEAD) { - atomic_dec16(&up_count); - } - /* Set state for the specified CPU */ per_cpu(boot_state, pcpu_id) = state; }