aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/include/commontypes.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/staging/unisys/include/commontypes.h85
1 files changed, 1 insertions, 84 deletions
diff --git a/drivers/staging/unisys/include/commontypes.h b/drivers/staging/unisys/include/commontypes.h
index 9de6f9dc5fbf..4311e9f6200f 100644
--- a/drivers/staging/unisys/include/commontypes.h
+++ b/drivers/staging/unisys/include/commontypes.h
@@ -20,58 +20,16 @@
* similar abbreviated content */
#define _SUPERVISOR_COMMONTYPES_H_
-#ifdef __KERNEL__
#include <linux/types.h>
#include <linux/version.h>
#include <linux/io.h>
#include <linux/uuid.h>
-#else
-#include <stdint.h>
-#include <syslog.h>
-#endif
-
-#define U8 uint8_t
-#define U16 uint16_t
-#define U32 uint32_t
-#define U64 uint64_t
-#define S8 int8_t
-#define S16 int16_t
-#define S32 int32_t
-#define S64 int64_t
-
-#ifdef __KERNEL__
-
-#ifdef CONFIG_X86_32
-#define UINTN U32
-#else
-#define UINTN U64
-#endif
-
-#else
-
-#include <stdint.h>
-#if __WORDSIZE == 32
-#define UINTN U32
-#elif __WORDSIZE == 64
-#define UINTN U64
-#else
-#error Unsupported __WORDSIZE
-#endif
-
-#endif
-
-typedef U64 GUEST_PHYSICAL_ADDRESS;
-#define MEMSET(ptr, val, len) memset(ptr, val, len)
-#define MEMCMP(m1, m2, len) memcmp(m1, m2, len)
-#define MEMCMP_IO(m1, m2, len) memcmp((void __force *)m1, m2, len)
-#define STRLEN(s) ((UINTN)strlen((const char *)s))
-#define STRCPY(d, s) (strcpy((char *)d, (const char *)s))
+typedef u64 GUEST_PHYSICAL_ADDRESS;
#define INLINE inline
#define OFFSETOF offsetof
-#ifdef __KERNEL__
#define MEMORYBARRIER mb()
#define MEMCPY(dest, src, len) memcpy(dest, src, len)
#define MEMCPY_TOIO(dest, src, len) memcpy_toio(dest, src, len)
@@ -108,47 +66,6 @@ typedef U64 GUEST_PHYSICAL_ADDRESS;
LineNumber, Str, args...) \
pr_info(Str, ## args)
-#else
-#define MEMCPY(dest, src, len) memcpy(dest, src, len)
-
-#define MEMORYBARRIER mb()
-
-#define CHANNEL_GUID_MISMATCH(chType, chName, field, expected, actual, fil, \
- lin, logCtx) \
- do { \
- syslog(LOG_USER | LOG_ERR, \
- "Channel mismatch on channel=%s(%pUL) field=%s expected=%pUL actual=%pUL @%s:%d", \
- chName, &chType, field, \
- &expected, &actual, \
- fil, lin); \
- } while (0)
-
-#define CHANNEL_U32_MISMATCH(chType, chName, field, expected, actual, fil, \
- lin, logCtx) \
- do { \
- syslog(LOG_USER | LOG_ERR, \
- "Channel mismatch on channel=%s(%pUL) field=%s expected=0x%-8.8lx actual=0x%-8.8lx @%s:%d", \
- chName, chType, field, \
- (unsigned long)expected, (unsigned long)actual, \
- fil, lin); \
- } while (0)
-
-#define CHANNEL_U64_MISMATCH(chType, chName, field, expected, actual, fil, \
- lin, logCtx) \
- do { \
- syslog(LOG_USER | LOG_ERR, \
- "Channel mismatch on channel=%s(%pUL) field=%s expected=0x%-8.8Lx actual=0x%-8.8Lx @%s:%d", \
- chName, chType, field, \
- (unsigned long long)expected, \
- (unsigned long long)actual, \
- fil, lin); \
- } while (0)
-
-#define UltraLogEvent(logCtx, EventId, Severity, SubsystemMask, pFunctionName, \
- LineNumber, Str, args...) \
- syslog(LOG_USER | LOG_INFO, Str, ## args)
-#endif
-
#define VolatileBarrier() MEMORYBARRIER
#endif