diff --git a/hypervisor/include/debug/logmsg.h b/hypervisor/include/debug/logmsg.h index bdff0dd8a..81cb14d1e 100644 --- a/hypervisor/include/debug/logmsg.h +++ b/hypervisor/include/debug/logmsg.h @@ -31,9 +31,6 @@ extern uint16_t console_loglevel; extern uint16_t mem_loglevel; extern uint16_t npk_loglevel; -void init_logmsg(uint32_t flags); -void print_logmsg_buffer(uint16_t pcpu_id); -void do_logmsg(uint32_t severity, const char *fmt, ...); void asm_assert(int32_t line, const char *file, const char *txt); @@ -44,6 +41,16 @@ void asm_assert(int32_t line, const char *file, const char *txt); } \ } while (0) +#else /* HV_DEBUG */ + +#define ASSERT(x, ...) do { } while (0) + +#endif /* HV_DEBUG */ + +void init_logmsg(uint32_t flags); +void print_logmsg_buffer(uint16_t pcpu_id); +void do_logmsg(uint32_t severity, const char *fmt, ...); + /** The well known printf() function. * * Formats a string and writes it to the console output. @@ -68,35 +75,6 @@ void printf(const char *fmt, ...); void vprintf(const char *fmt, va_list args); -#else /* HV_DEBUG */ - -static inline void init_logmsg(__unused uint32_t flags) -{ -} - -static inline void do_logmsg(__unused uint32_t severity, - __unused const char *fmt, ...) -{ -} - -static inline void print_logmsg_buffer(__unused uint16_t pcpu_id) -{ -} - -#define ASSERT(x, ...) do { } while (0) - -static inline void printf(__unused const char *fmt, ...) -{ - -} - -static inline void vprintf(__unused const char *fmt, __unused va_list args) -{ - -} - -#endif /* HV_DEBUG */ - #ifndef pr_prefix #define pr_prefix #endif diff --git a/hypervisor/release/logmsg.c b/hypervisor/release/logmsg.c new file mode 100644 index 000000000..eaa390a6b --- /dev/null +++ b/hypervisor/release/logmsg.c @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2018 Intel Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +void init_logmsg(__unused uint32_t flags) {} +void do_logmsg(__unused uint32_t severity, __unused const char *fmt, ...) {} +void print_logmsg_buffer(__unused uint16_t pcpu_id) {} +void printf(__unused const char *fmt, ...) {} +void vprintf(__unused const char *fmt, __unused va_list args) {}