From owner-svn-src-projects@FreeBSD.ORG Thu Oct 14 01:47:47 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 B1ED4106564A; Thu, 14 Oct 2010 01:47:47 +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 A18AB8FC1C; Thu, 14 Oct 2010 01:47:47 +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 o9E1llhA008478; Thu, 14 Oct 2010 01:47:47 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9E1llKY008475; Thu, 14 Oct 2010 01:47:47 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201010140147.o9E1llKY008475@svn.freebsd.org> From: Jeff Roberson Date: Thu, 14 Oct 2010 01:47:47 +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: r213821 - 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, 14 Oct 2010 01:47:47 -0000 Author: jeff Date: Thu Oct 14 01:47:47 2010 New Revision: 213821 URL: http://svn.freebsd.org/changeset/base/213821 Log: - Don't hold giant when calling wrapped callouts. - Do hold giant when calling devclass_add_child. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/include/linux/module.h projects/ofed/head/sys/ofed/include/linux/pci.h Modified: projects/ofed/head/sys/ofed/include/linux/module.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/module.h Thu Oct 14 01:47:07 2010 (r213820) +++ projects/ofed/head/sys/ofed/include/linux/module.h Thu Oct 14 01:47:47 2010 (r213821) @@ -61,7 +61,9 @@ _module_run(void *arg) printf("Running %s (%p)\n", name, pc); fn = arg; + DROP_GIANT(); fn(); + PICKUP_GIANT(); } #define module_init(fn) \ Modified: projects/ofed/head/sys/ofed/include/linux/pci.h ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/pci.h Thu Oct 14 01:47:07 2010 (r213820) +++ projects/ofed/head/sys/ofed/include/linux/pci.h Thu Oct 14 01:47:47 2010 (r213821) @@ -425,8 +425,10 @@ pci_register_driver(struct pci_driver *p pdrv->driver.name = pdrv->name; pdrv->driver.methods = pci_methods; pdrv->driver.size = sizeof(struct pci_dev); + mtx_lock(&Giant); error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT, &pdrv->bsdclass); + mtx_unlock(&Giant); if (error) return (-error); return (0);