From owner-svn-src-head@freebsd.org Fri Oct 20 14:04:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E15E8E36594; Fri, 20 Oct 2017 14:04:02 +0000 (UTC) (envelope-from mjg@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 mx1.freebsd.org (Postfix) with ESMTPS id ACCFC77706; Fri, 20 Oct 2017 14:04:02 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9KE41nW078440; Fri, 20 Oct 2017 14:04:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9KE417j078439; Fri, 20 Oct 2017 14:04:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201710201404.v9KE417j078439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 20 Oct 2017 14:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324803 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 324803 X-SVN-Commit-Repository: base 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.23 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: Fri, 20 Oct 2017 14:04:03 -0000 Author: mjg Date: Fri Oct 20 14:04:01 2017 New Revision: 324803 URL: https://svnweb.freebsd.org/changeset/base/324803 Log: mtx: fix up UP build after r324778 Reported by: Michael Butler Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Fri Oct 20 11:07:51 2017 (r324802) +++ head/sys/kern/kern_mutex.c Fri Oct 20 14:04:01 2017 (r324803) @@ -289,7 +289,9 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, int line) { struct mtx *m; +#ifdef SMP uintptr_t tid, v; +#endif m = mtxlock2mtx(c); @@ -306,6 +308,7 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, opts &= ~MTX_RECURSE; WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); +#ifdef SMP spinlock_enter(); tid = (uintptr_t)curthread; v = MTX_UNOWNED; @@ -314,6 +317,9 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, else LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, m, 0, 0, file, line); +#else + __mtx_lock_spin(m, curthread, opts, file, line); +#endif LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line);