From owner-svn-src-projects@FreeBSD.ORG Thu Jul 29 02:10:20 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 24573106566B; Thu, 29 Jul 2010 02:10:20 +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 140348FC1A; Thu, 29 Jul 2010 02:10:20 +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 o6T2AJ5Y098799; Thu, 29 Jul 2010 02:10:19 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6T2AJAp098797; Thu, 29 Jul 2010 02:10:19 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201007290210.o6T2AJAp098797@svn.freebsd.org> From: Jeff Roberson Date: Thu, 29 Jul 2010 02:10:19 +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: r210584 - 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:10:20 -0000 Author: jeff Date: Thu Jul 29 02:10:19 2010 New Revision: 210584 URL: http://svn.freebsd.org/changeset/base/210584 Log: - Linux determines module load order by processing link dependencies. I don't fully understand how this works with builtin modules but we must add some extra information about load order. I may revisit this. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/include/linux/module.h Modified: projects/ofed/head/sys/ofed/include/linux/module.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/module.h Thu Jul 29 02:09:25 2010 (r210583) +++ projects/ofed/head/sys/ofed/include/linux/module.h Thu Jul 29 02:10:19 2010 (r210584) @@ -44,10 +44,18 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) -#define module_init(fn) \ - SYSINIT(fn, SI_SUB_DRIVERS, SI_ORDER_ANY, (fn), NULL) +#define module_init(fn) \ + SYSINIT(fn, SI_SUB_RUN_SCHEDULER, SI_ORDER_FIRST, (fn), NULL) + +/* + * XXX This is a freebsdism designed to work around not having a module + * load order resolver built in. + */ +#define module_init_order(fn, order) \ + SYSINIT(fn, SI_SUB_RUN_SCHEDULER, (order), (fn), NULL) + #define module_exit(fn) \ - SYSUNINIT(fn, SI_SUB_DRIVERS, SI_ORDER_ANY, (fn), NULL) + SYSUNINIT(fn, SI_SUB_RUN_SCHEDULER, SI_ORDER_FIRST, (fn), NULL) #define module_get(module) #define module_put(module)