Don't use HV_DEBUG outside debug directory

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1 2018-03-22 00:23:01 +08:00 committed by Anthony Xu
parent fd1d937035
commit 304cab9acf
3 changed files with 8 additions and 20 deletions

View File

@ -254,9 +254,7 @@ static void set_fs_base(void)
void bsp_boot_init(void)
{
#ifdef HV_DEBUG
uint64_t start_tsc = rdtsc();
#endif
/* Clear BSS */
memset(_ld_bss_start, 0, _ld_bss_end - _ld_bss_start);
@ -346,8 +344,6 @@ void bsp_boot_init(void)
init_logmsg(LOG_BUF_SIZE,
LOG_DESTINATION);
#ifdef HV_DEBUG
/* Log first messages */
if (HV_RC_VERSION)
printf("HV version %d.%d-rc%d-%s-%s build by %s, start time %lluus\r\n",
HV_MAJOR_VERSION, HV_MINOR_VERSION, HV_RC_VERSION,
@ -361,7 +357,7 @@ void bsp_boot_init(void)
printf("API version %d.%d\r\n",
HV_API_MAJOR_VERSION, HV_API_MINOR_VERSION);
#endif
pr_dbg("Core %d is up", CPU_BOOT_ID);
/* Warn for security feature not ready */

View File

@ -632,7 +632,6 @@ hcall_reset_ptdev_intr_info(struct vm *vm, uint64_t vmid, uint64_t param)
return ret;
}
#ifdef HV_DEBUG
int64_t hcall_setup_sbuf(struct vm *vm, uint64_t param)
{
struct sbuf_setup_param ssp;
@ -652,13 +651,6 @@ int64_t hcall_setup_sbuf(struct vm *vm, uint64_t param)
return sbuf_share_setup(ssp.pcpu_id, ssp.sbuf_id, hva);
}
#else /* HV_DEBUG */
int64_t hcall_setup_sbuf(__unused struct vm *vm,
__unused uint64_t param)
{
return -1;
}
#endif /* HV_DEBUG */
static void fire_vhm_interrupt(void)
{
@ -678,7 +670,6 @@ static void fire_vhm_interrupt(void)
vlapic_intr_edge(vcpu, VECTOR_VIRT_IRQ_VHM);
}
#ifdef HV_DEBUG
static void acrn_print_request(int vcpu_id, struct vhm_request *req)
{
switch (req->type) {
@ -708,12 +699,6 @@ static void acrn_print_request(int vcpu_id, struct vhm_request *req)
break;
}
}
#else
static void acrn_print_request(__unused int vcpu_id,
__unused struct vhm_request *req)
{
}
#endif
int acrn_insert_request_wait(struct vcpu *vcpu, struct vhm_request *req)
{

View File

@ -150,6 +150,13 @@ static inline int sbuf_put(
return 0;
}
static inline int sbuf_share_setup(
__unused uint32_t pcpu_id,
__unused uint32_t sbuf_id,
__unused uint64_t *hva)
{
return -1;
}
#endif /* HV_DEBUG */
#endif /* SHARED_BUFFER_H */