summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-10-19 12:08:06 +0000
committerhselasky <hselasky@FreeBSD.org>2015-10-19 12:08:06 +0000
commitc2a6426cb9ffa31713523a61187c8876c801ed54 (patch)
treee2866ed4655cd0714b3db05994e3fcffe06c4eaf /sys/ofed
parenta2fecac047a73c99b707fb923d6909cad38c86af (diff)
downloadFreeBSD-src-c2a6426cb9ffa31713523a61187c8876c801ed54.zip
FreeBSD-src-c2a6426cb9ffa31713523a61187c8876c801ed54.tar.gz
Merge LinuxKPI changes from DragonflyBSD:
- Map more Linux compiler related defines to FreeBSD ones. Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/include/linux/compiler.h10
-rw-r--r--sys/ofed/include/linux/types.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/ofed/include/linux/compiler.h b/sys/ofed/include/linux/compiler.h
index 9b1a5ad..263b281 100644
--- a/sys/ofed/include/linux/compiler.h
+++ b/sys/ofed/include/linux/compiler.h
@@ -2,7 +2,8 @@
* Copyright (c) 2010 Isilon Systems, Inc.
* Copyright (c) 2010 iX Systems, Inc.
* Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2015 Mellanox Technologies, Ltd.
+ * Copyright (c) 2015 François Tigeot
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,5 +63,12 @@
#define typeof(x) __typeof(x)
#define uninitialized_var(x) x = x
+#define __read_mostly __attribute__((__section__(".data.read_mostly")))
+#define __always_unused __unused
+#define __must_check __result_use_check
+
+#define __printf(a,b) __printflike(a,b)
+
+#define barrier() __asm__ __volatile__("": : :"memory")
#endif /* _LINUX_COMPILER_H_ */
diff --git a/sys/ofed/include/linux/types.h b/sys/ofed/include/linux/types.h
index 9fff0ec..b5def55 100644
--- a/sys/ofed/include/linux/types.h
+++ b/sys/ofed/include/linux/types.h
@@ -36,8 +36,6 @@
#include <linux/compiler.h>
#include <asm/types.h>
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
-
#ifndef __bitwise__
#ifdef __CHECKER__
#define __bitwise__ __attribute__((bitwise))
OpenPOWER on IntegriCloud