Skip to content

Commit

Permalink
HV: move AP_MASK to cpu.h
Browse files Browse the repository at this point in the history
It is better to use an unified MACRO. So, this patch moves AP_MASK to cpu.h
and removes the defination of the MACRO spanning different source files.

Tracked-On: #2991
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
  • Loading branch information
KaigeFu authored and acrnsi committed Apr 24, 2019
1 parent 7b6fe14 commit 581c0a2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions hypervisor/arch/x86/cpu.c
Expand Up @@ -30,8 +30,6 @@
#define CPU_UP_TIMEOUT 100U /* millisecond */
#define CPU_DOWN_TIMEOUT 100U /* millisecond */

#define AP_MASK (((1UL << phys_cpu_num) - 1UL) & ~(1UL << 0U))

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;
Expand Down
2 changes: 0 additions & 2 deletions hypervisor/arch/x86/pm.c
Expand Up @@ -20,8 +20,6 @@
#include <lapic.h>
#include <vcpu.h>

#define AP_MASK (((1UL << get_pcpu_nums()) - 1UL) & ~(1UL << 0U))

struct cpu_context cpu_ctx;

/* The values in this structure should come from host ACPI table */
Expand Down
2 changes: 2 additions & 0 deletions hypervisor/include/arch/x86/cpu.h
Expand Up @@ -139,6 +139,8 @@

#define BUS_LOCK "lock ; "

#define AP_MASK (((1UL << get_pcpu_nums()) - 1UL) & ~(1UL << 0U))

/**
*
* Identifiers for architecturally defined registers.
Expand Down

0 comments on commit 581c0a2

Please sign in to comment.