diff --git a/hypervisor/include/hv_lib.h b/hypervisor/include/hv_lib.h index a42eca4d8..4c6fe151f 100644 --- a/hypervisor/include/hv_lib.h +++ b/hypervisor/include/hv_lib.h @@ -9,11 +9,9 @@ #include #include -#include #include #include #include -#include #include #include #include diff --git a/hypervisor/include/lib/macros.h b/hypervisor/include/lib/macros.h deleted file mode 100644 index 586811447..000000000 --- a/hypervisor/include/lib/macros.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2018 Intel Corporation. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef MACROS_H -#define MACROS_H - -/** Replaces 'x' by the string "x". */ -#define STRINGIFY(x) #x - -/* Macro used to check if a value is aligned to the required boundary. - * Returns TRUE if aligned; FALSE if not aligned - * NOTE: The required alignment must be a power of 2 (2, 4, 8, 16, 32, etc) - */ -static inline bool mem_aligned_check(uint64_t value, uint64_t req_align) -{ - return ((value & (req_align - 1UL)) == 0UL); -} - -#endif /* INCLUDE_MACROS_H defined */ diff --git a/hypervisor/include/lib/stdarg.h b/hypervisor/include/lib/stdarg.h deleted file mode 100644 index fee02c449..000000000 --- a/hypervisor/include/lib/stdarg.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright (C) 2018 Intel Corporation. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef STDARG_H -#define STDARG_H - -#include - -#define va_start __builtin_va_start -#define va_end __builtin_va_end - -#endif /* STDARG_H */ diff --git a/hypervisor/include/lib/util.h b/hypervisor/include/lib/util.h index 4f19906ed..f558b780b 100644 --- a/hypervisor/include/lib/util.h +++ b/hypervisor/include/lib/util.h @@ -8,6 +8,8 @@ #define UTIL_H #define offsetof(st, m) __builtin_offsetof(st, m) +#define va_start __builtin_va_start +#define va_end __builtin_va_end /** Roundup (x/y) to ( x/y + (x%y) ? 1 : 0) **/ #define INT_DIV_ROUNDUP(x, y) ((((x)+(y))-1)/(y)) @@ -16,4 +18,16 @@ #define max(x, y) ((x) < (y)) ? (y) : (x) +/** Replaces 'x' by the string "x". */ +#define STRINGIFY(x) #x + +/* Macro used to check if a value is aligned to the required boundary. + * Returns TRUE if aligned; FALSE if not aligned + * NOTE: The required alignment must be a power of 2 (2, 4, 8, 16, 32, etc) + */ +static inline bool mem_aligned_check(uint64_t value, uint64_t req_align) +{ + return ((value & (req_align - 1UL)) == 0UL); +} + #endif /* UTIL_H */