From 637326bc6dca33a2251e12d56a9507fbb3c68443 Mon Sep 17 00:00:00 2001 From: Shiqing Gao Date: Tue, 27 Nov 2018 15:08:22 +0800 Subject: [PATCH] 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 Acked-by: Eddie Dong --- hypervisor/include/debug/vuart.h | 16 +++------------- hypervisor/release/vuart.c | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 hypervisor/release/vuart.c diff --git a/hypervisor/include/debug/vuart.h b/hypervisor/include/debug/vuart.h index c3143a040..a53f318b3 100644 --- a/hypervisor/include/debug/vuart.h +++ b/hypervisor/include/debug/vuart.h @@ -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 */ diff --git a/hypervisor/release/vuart.c b/hypervisor/release/vuart.c new file mode 100644 index 000000000..989a0721d --- /dev/null +++ b/hypervisor/release/vuart.c @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2018 Intel Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +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) {}