@@ -38,9 +38,6 @@ void __bug(const char *file, int line) __attribute__((noreturn));
#define BUG() __bug(__FILE__, __LINE__)
#define BUG_ON(p) do { if (p) BUG(); } while (0)
-#define MB(mb) (mb##ULL << 20)
-#define GB(gb) (gb##ULL << 30)
-
static inline int test_bit(unsigned int b, const void *p)
{
return !!(((const uint8_t *)p)[b>>3] & (1u<<(b&7)));
@@ -20,7 +20,6 @@
#include "init-dom-json.h"
#define LAPIC_BASE_ADDRESS 0xfee00000UL
-#define GB(x) ((uint64_t)x << 30)
static uint32_t domid = ~0;
static char *kernel;
@@ -91,6 +91,10 @@
#define __AC(X, Y) (X ## Y)
#define _AC(X, Y) __AC(X, Y)
+/* Size macros. */
+#define MB(_mb) (_AC(_mb, ULL) << 20)
+#define GB(_gb) (_AC(_gb, ULL) << 30)
+
#define get_unaligned_t(type, ptr) ({ \
const struct { type x; } __packed *ptr_ = (typeof(ptr_))(ptr); \
ptr_->x; \
@@ -126,10 +126,6 @@
#define PVSHIM_BASENAME "xen-shim"
#define PVSHIM_CMDLINE "pv-shim console=xen,pv"
-/* Size macros. */
-#define MB(_mb) (_AC(_mb, ULL) << 20)
-#define GB(_gb) (_AC(_gb, ULL) << 30)
-
#define DIV_ROUNDUP(n, d) (((n) + (d) - 1) / (d))
#define LIBXL__LOGGING_ENABLED