From owner-svn-src-all@freebsd.org Tue Dec 3 16:50:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BE2F1B5362; Tue, 3 Dec 2019 16:50:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47S7JH1dMwz4c7y; Tue, 3 Dec 2019 16:50:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CA981AA07; Tue, 3 Dec 2019 16:50:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB3Go66R090417; Tue, 3 Dec 2019 16:50:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB3Go6LG090416; Tue, 3 Dec 2019 16:50:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912031650.xB3Go6LG090416@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 3 Dec 2019 16:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355338 - stable/12/sys/cam X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cam X-SVN-Commit-Revision: 355338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2019 16:50:07 -0000 Author: mav Date: Tue Dec 3 16:50:06 2019 New Revision: 355338 URL: https://svnweb.freebsd.org/changeset/base/355338 Log: MFC r355013: Remove xpt_lock mutex. CAM does not require SIM locks for years, and obviously does not require it for completely virtual XPT SIM. Modified: stable/12/sys/cam/cam_xpt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/cam_xpt.c ============================================================================== --- stable/12/sys/cam/cam_xpt.c Tue Dec 3 16:48:21 2019 (r355337) +++ stable/12/sys/cam/cam_xpt.c Tue Dec 3 16:50:06 2019 (r355338) @@ -128,7 +128,6 @@ struct xpt_softc { struct root_hold_token xpt_rootmount; struct mtx xpt_topo_lock; - struct mtx xpt_lock; struct taskqueue *xpt_taskq; }; @@ -895,7 +894,6 @@ xpt_init(void *dummy) STAILQ_INIT(&xsoftc.highpowerq); xsoftc.num_highpower = CAM_MAX_HIGHPOWER; - mtx_init(&xsoftc.xpt_lock, "XPT lock", NULL, MTX_DEF); mtx_init(&xsoftc.xpt_highpower_lock, "XPT highpower lock", NULL, MTX_DEF); xsoftc.xpt_taskq = taskqueue_create("CAM XPT task", M_WAITOK, taskqueue_thread_enqueue, /*context*/&xsoftc.xpt_taskq); @@ -920,21 +918,18 @@ xpt_init(void *dummy) "xpt", /*softc*/NULL, /*unit*/0, - /*mtx*/&xsoftc.xpt_lock, + /*mtx*/NULL, /*max_dev_transactions*/0, /*max_tagged_dev_transactions*/0, devq); if (xpt_sim == NULL) return (ENOMEM); - mtx_lock(&xsoftc.xpt_lock); if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { - mtx_unlock(&xsoftc.xpt_lock); printf("xpt_init: xpt_bus_register failed with status %#x," " failing attach\n", status); return (EINVAL); } - mtx_unlock(&xsoftc.xpt_lock); /* * Looking at the XPT from the SIM layer, the XPT is