change get_monitor_cap to has_monitor_cap

has_monitor_cap is more suitable name

v2:
- rename to has_monitor_cap

Changes to be committed:
	modified:   arch/x86/cpu.c
	modified:   arch/x86/cpu_caps.c
	modified:   include/arch/x86/cpu_caps.h

Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Jason Chen CJ 2018-12-10 14:58:28 +08:00 committed by wenlingz
parent 6830619d08
commit 63773db437
3 changed files with 3 additions and 3 deletions

View File

@ -367,7 +367,7 @@ static void print_hv_banner(void)
/* wait until *sync == wake_sync */ /* wait until *sync == wake_sync */
void wait_sync_change(uint64_t *sync, uint64_t wake_sync) void wait_sync_change(uint64_t *sync, uint64_t wake_sync)
{ {
if (get_monitor_cap()) { if (has_monitor_cap()) {
/* Wait for the event to be set using monitor/mwait */ /* Wait for the event to be set using monitor/mwait */
asm volatile ("1: cmpq %%rbx,(%%rax)\n" asm volatile ("1: cmpq %%rbx,(%%rax)\n"
" je 2f\n" " je 2f\n"

View File

@ -55,7 +55,7 @@ bool cpu_has_cap(uint32_t bit)
return ret; return ret;
} }
bool get_monitor_cap(void) bool has_monitor_cap(void)
{ {
if (cpu_has_cap(X86_FEATURE_MONITOR)) { if (cpu_has_cap(X86_FEATURE_MONITOR)) {
/* don't use monitor for CPU (family: 0x6 model: 0x5c) /* don't use monitor for CPU (family: 0x6 model: 0x5c)

View File

@ -59,7 +59,7 @@ struct cpuinfo_x86 {
extern struct cpuinfo_x86 boot_cpu_data; extern struct cpuinfo_x86 boot_cpu_data;
bool get_monitor_cap(void); bool has_monitor_cap(void);
bool is_apicv_reg_virtualization_supported(void); bool is_apicv_reg_virtualization_supported(void);
bool is_apicv_intr_delivery_supported(void); bool is_apicv_intr_delivery_supported(void);
bool is_apicv_posted_intr_supported(void); bool is_apicv_posted_intr_supported(void);