staging: unisys: remove INLINE define from commontypes
[pandora-kernel.git] / drivers / staging / unisys / include / commontypes.h
1 /* Copyright (C) 2010 - 2013 UNISYS CORPORATION
2  * All rights reserved.
3  *
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.
8  *
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
13  * details.
14  */
15
16 #ifndef _COMMONTYPES_H_
17 #define _COMMONTYPES_H_
18
19 /* define the following to prevent include nesting in kernel header files of
20  * similar abbreviated content */
21 #define _SUPERVISOR_COMMONTYPES_H_
22
23 #include <linux/types.h>
24 #include <linux/version.h>
25 #include <linux/io.h>
26 #include <linux/uuid.h>
27
28 typedef u64 GUEST_PHYSICAL_ADDRESS;
29
30 #define OFFSETOF offsetof
31
32 #define CHANNEL_GUID_MISMATCH(chType, chName, field, expected, actual, fil, \
33                               lin, logCtx)                              \
34         do {                                                            \
35                 pr_err("Channel mismatch on channel=%s(%pUL) field=%s expected=%pUL actual=%pUL @%s:%d\n", \
36                        chName, &chType, field,  \
37                        &expected, &actual, \
38                        fil, lin);                                       \
39         } while (0)
40 #define CHANNEL_U32_MISMATCH(chType, chName, field, expected, actual, fil, \
41                              lin, logCtx)                               \
42         do {                                                            \
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,  \
46                        fil, lin);                                       \
47         } while (0)
48
49 #define CHANNEL_U64_MISMATCH(chType, chName, field, expected, actual, fil, \
50                              lin, logCtx)                               \
51         do {                                                            \
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,                      \
56                        fil, lin);                                       \
57         } while (0)
58
59 #define UltraLogEvent(logCtx, EventId, Severity, SubsystemMask, pFunctionName, \
60                       LineNumber, Str, args...)                         \
61         pr_info(Str, ## args)
62
63 #endif
64