1 /* Copyright (C) 2010 - 2013 UNISYS CORPORATION
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at
7 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12 * NON INFRINGEMENT. See the GNU General Public License for more
16 #ifndef _COMMONTYPES_H_
17 #define _COMMONTYPES_H_
19 /* define the following to prevent include nesting in kernel header files of
20 * similar abbreviated content */
21 #define _SUPERVISOR_COMMONTYPES_H_
23 #include <linux/types.h>
24 #include <linux/version.h>
26 #include <linux/uuid.h>
28 typedef u64 GUEST_PHYSICAL_ADDRESS;
30 #define OFFSETOF offsetof
32 #define CHANNEL_GUID_MISMATCH(chType, chName, field, expected, actual, fil, \
35 pr_err("Channel mismatch on channel=%s(%pUL) field=%s expected=%pUL actual=%pUL @%s:%d\n", \
36 chName, &chType, field, \
40 #define CHANNEL_U32_MISMATCH(chType, chName, field, expected, actual, fil, \
43 pr_err("Channel mismatch on channel=%s(%pUL) field=%s expected=0x%-8.8lx actual=0x%-8.8lx @%s:%d\n", \
44 chName, &chType, field, \
45 (unsigned long)expected, (unsigned long)actual, \
49 #define CHANNEL_U64_MISMATCH(chType, chName, field, expected, actual, fil, \
52 pr_err("Channel mismatch on channel=%s(%pUL) field=%s expected=0x%-8.8Lx actual=0x%-8.8Lx @%s:%d\n", \
53 chName, &chType, field, \
54 (unsigned long long)expected, \
55 (unsigned long long)actual, \
59 #define UltraLogEvent(logCtx, EventId, Severity, SubsystemMask, pFunctionName, \
60 LineNumber, Str, args...) \