From owner-svn-src-projects@FreeBSD.ORG Thu Jul 29 02:15:03 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B2ED1065675; Thu, 29 Jul 2010 02:15:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A9D58FC19; Thu, 29 Jul 2010 02:15:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6T2F2v2000159; Thu, 29 Jul 2010 02:15:02 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T2F2HT000155; Thu, 29 Jul 2010 02:15:02 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201007290215.o6T2F2HT000155@svn.freebsd.org> From: Jeff Roberson Date: Thu, 29 Jul 2010 02:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210588 - projects/ofed/head/sys/ofed/include/linux X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2010 02:15:03 -0000 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 + #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 +#include #include #include 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 #include -#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)