Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2017 13:25:35 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r322502 - stable/9/sys/ofed/include/linux
Message-ID:  <201708141325.v7EDPZlw073460@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Aug 14 13:25:35 2017
New Revision: 322502
URL: https://svnweb.freebsd.org/changeset/base/322502

Log:
  MFC r289577:
  Merge LinuxKPI changes from DragonflyBSD:
  - Map more Linux compiler related defines to FreeBSD ones.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/9/sys/ofed/include/linux/compiler.h
  stable/9/sys/ofed/include/linux/types.h

Modified: stable/9/sys/ofed/include/linux/compiler.h
==============================================================================
--- stable/9/sys/ofed/include/linux/compiler.h	Mon Aug 14 13:15:13 2017	(r322501)
+++ stable/9/sys/ofed/include/linux/compiler.h	Mon Aug 14 13:25:35 2017	(r322502)
@@ -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,6 +63,13 @@
 #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")
 
 #define	ACCESS_ONCE(x)			(*(volatile __typeof(x) *)&(x))
   

Modified: stable/9/sys/ofed/include/linux/types.h
==============================================================================
--- stable/9/sys/ofed/include/linux/types.h	Mon Aug 14 13:15:13 2017	(r322501)
+++ stable/9/sys/ofed/include/linux/types.h	Mon Aug 14 13:25:35 2017	(r322502)
@@ -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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708141325.v7EDPZlw073460>