From owner-svn-src-head@FreeBSD.ORG Mon Feb 23 12:54:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3557CFB; Mon, 23 Feb 2015 12:54:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE6D9F20; Mon, 23 Feb 2015 12:54:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1NCslvK006931; Mon, 23 Feb 2015 12:54:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1NCsl0V006927; Mon, 23 Feb 2015 12:54:47 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502231254.t1NCsl0V006927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Feb 2015 12:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279205 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2015 12:54:47 -0000 Author: hselasky Date: Mon Feb 23 12:54:46 2015 New Revision: 279205 URL: https://svnweb.freebsd.org/changeset/base/279205 Log: Macro fixes: - Add missing "order_base_2()" macro. - Fix BUILD_BUG_ON() macro. MFC after: 1 month Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/kernel.h head/sys/ofed/include/linux/log2.h Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Mon Feb 23 09:40:59 2015 (r279204) +++ head/sys/ofed/include/linux/kernel.h Mon Feb 23 12:54:46 2015 (r279205) @@ -59,7 +59,7 @@ #define KERN_INFO "<6>" #define KERN_DEBUG "<7>" -#define BUILD_BUG_ON(x) CTASSERT(x) +#define BUILD_BUG_ON(x) CTASSERT(!(x)) #define BUG() panic("BUG") #define BUG_ON(condition) do { if (condition) BUG(); } while(0) Modified: head/sys/ofed/include/linux/log2.h ============================================================================== --- head/sys/ofed/include/linux/log2.h Mon Feb 23 09:40:59 2015 (r279204) +++ head/sys/ofed/include/linux/log2.h Mon Feb 23 12:54:46 2015 (r279205) @@ -167,4 +167,6 @@ int __ilog2_u64(u64 n) __ilog2_u64(n) \ ) +#define order_base_2(x) ilog2(roundup_pow_of_two(x)) + #endif /* _LINUX_LOG2_H_ */