svn commit: r210588 - projects/ofed/head/sys/ofed/include/linux
Jeff Roberson
jeff at FreeBSD.org
Thu Jul 29 02:15:03 UTC 2010
Author: jeff
Date: Thu Jul 29 02:15:02 2010
New Revision: 210588
URL: http://svn.freebsd.org/changeset/base/210588
Log:
- Fix some include orders.
- Define a few missing printk wrappers
- Fix min/max to match the typeless linux version.
Sponsored by: Isilon Systems, iX Systems, and Panasas.
Modified:
projects/ofed/head/sys/ofed/include/linux/compiler.h
projects/ofed/head/sys/ofed/include/linux/jiffies.h
projects/ofed/head/sys/ofed/include/linux/kernel.h
Modified: projects/ofed/head/sys/ofed/include/linux/compiler.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/compiler.h Thu Jul 29 02:13:04 2010 (r210587)
+++ projects/ofed/head/sys/ofed/include/linux/compiler.h Thu Jul 29 02:15:02 2010 (r210588)
@@ -29,6 +29,8 @@
#ifndef _LINUX_COMPILER_H_
#define _LINUX_COMPILER_H_
+#include <sys/cdefs.h>
+
#define __user
#define __kernel
#define __safe
@@ -47,9 +49,12 @@
#define __devinitdata
#define __init
#define __devinit
+#define __devexit
#define __exit
#define __stringify(x) #x
#define __attribute_const__ __attribute__((__const__))
+#undef __always_inline
+#define __always_inline inline
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
Modified: projects/ofed/head/sys/ofed/include/linux/jiffies.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/jiffies.h Thu Jul 29 02:13:04 2010 (r210587)
+++ projects/ofed/head/sys/ofed/include/linux/jiffies.h Thu Jul 29 02:15:02 2010 (r210588)
@@ -27,7 +27,9 @@
*/
#ifndef _LINUX_JIFFIES_H_
#define _LINUX_JIFFIES_H_
+
#include <linux/types.h>
+#include <linux/kernel.h>
#include <sys/time.h>
#include <sys/kernel.h>
Modified: projects/ofed/head/sys/ofed/include/linux/kernel.h
==============================================================================
--- projects/ofed/head/sys/ofed/include/linux/kernel.h Thu Jul 29 02:13:04 2010 (r210587)
+++ projects/ofed/head/sys/ofed/include/linux/kernel.h Thu Jul 29 02:15:02 2010 (r210588)
@@ -47,16 +47,26 @@
#include <linux/log2.h>
#include <asm/byteorder.h>
-#define BUG() panic("BUG")
-#define BUG_ON(condition) do { if (condition) BUG(); } while(0)
-#define WARN_ON BUG_ON
+#define KERN_EMERG "<0>"
+#define KERN_ALERT "<1>"
+#define KERN_CRIT "<2>"
+#define KERN_ERR "<3>"
+#define KERN_WARNING "<4>"
+#define KERN_NOTICE "<5>"
+#define KERN_INFO "<6>"
+#define KERN_DEBUG "<7>"
+
+#define BUG() panic("BUG")
+#define BUG_ON(condition) do { if (condition) BUG(); } while(0)
+#define WARN_ON BUG_ON
#undef ALIGN
-#define ALIGN(x, y) roundup2((x), (y))
-#define DIV_ROUND_UP howmany
+#define ALIGN(x, y) roundup2((x), (y))
+#define DIV_ROUND_UP howmany
-#define printk(X...) printf(X)
-#define udelay(t) DELAY(t)
+#define printk(X...) printf(X)
+#define pr_debug(fmt, ...) printk(KERN_DEBUG # fmt, ##__VA_ARGS__)
+#define udelay(t) DELAY(t)
#define container_of(ptr, type, member) \
({ \
@@ -66,17 +76,10 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#define KERN_EMERG "<0>"
-#define KERN_ALERT "<1>"
-#define KERN_CRIT "<2>"
-#define KERN_ERR "<3>"
-#define KERN_WARNING "<4>"
-#define KERN_NOTICE "<5>"
-#define KERN_INFO "<6>"
-#define KERN_DEBUG "<7>"
-
#define simple_strtoul strtoul
+#define min(x, y) (x < y ? x : y)
+#define max(x, y) (x > y ? x : y)
#define min_t(type, _x, _y) (type)(_x) < (type)(_y) ? (type)(_x) : (_y)
#define max_t(type, _x, _y) (type)(_x) > (type)(_y) ? (type)(_x) : (_y)
More information about the svn-src-projects
mailing list