hv: clean up function definitions in vuart.h

seperate the function definitions into debug/release directories
to better distinguish debug/release libraries

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shiqing Gao 2018-11-27 15:08:22 +08:00 committed by lijinxia
parent 7b74b2b909
commit 637326bc6d
2 changed files with 20 additions and 13 deletions

View File

@ -65,24 +65,14 @@ struct acrn_vuart {
struct acrn_vm *vm;
spinlock_t lock; /* protects all softc elements */
};
#ifdef CONFIG_PARTITION_MODE
extern int8_t vuart_vmid;
#endif
#ifdef HV_DEBUG
#endif /* CONFIG_PARTITION_MODE */
void vuart_init(struct acrn_vm *vm);
struct acrn_vuart *vuart_console_active(void);
void vuart_console_tx_chars(struct acrn_vuart *vu);
void vuart_console_rx_chars(struct acrn_vuart *vu);
#else
static inline void vuart_init(__unused struct acrn_vm *vm)
{
}
static inline struct acrn_vuart *vuart_console_active(void)
{
return NULL;
}
static inline void vuart_console_tx_chars(__unused struct acrn_vuart *vu) {}
static inline void vuart_console_rx_chars(__unused struct acrn_vuart *vu) {}
#endif /* HV_DEBUG */
#endif /* VUART_H */

View File

@ -0,0 +1,17 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
void vuart_init(__unused struct acrn_vm *vm) {}
struct acrn_vuart *vuart_console_active(void)
{
return NULL;
}
void vuart_console_tx_chars(__unused struct acrn_vuart *vu) {}
void vuart_console_rx_chars(__unused struct acrn_vuart *vu) {}