From owner-svn-src-head@freebsd.org Wed Jun 3 00:16:37 2020 Return-Path: Delivered-To: svn-src-head@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 875DD2FEA58; Wed, 3 Jun 2020 00:16:37 +0000 (UTC) (envelope-from jah@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49c8bT34Hfz4BB8; Wed, 3 Jun 2020 00:16:37 +0000 (UTC) (envelope-from jah@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 64C7925130; Wed, 3 Jun 2020 00:16:37 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0530GbCU085703; Wed, 3 Jun 2020 00:16:37 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0530GbcT085701; Wed, 3 Jun 2020 00:16:37 GMT (envelope-from jah@FreeBSD.org) Message-Id: <202006030016.0530GbcT085701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Wed, 3 Jun 2020 00:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361741 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 361741 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.33 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: Wed, 03 Jun 2020 00:16:37 -0000 Author: jah Date: Wed Jun 3 00:16:36 2020 New Revision: 361741 URL: https://svnweb.freebsd.org/changeset/base/361741 Log: Remove unnecessary WITNESS check in x86 bus_dma When I did some bus_dma cleanup in r320528, I brought forward some sketchy WITNESS checks from the prior x86 busdma wrappers, instead of recognizing them as technical debt and just dropping them. Two of these were removed in r346351 and r346851, but one remains in bounce_bus_dmamem_alloc(). This check could be constrained to only apply in the BUS_DMA_NOWAIT case, but it's cleaner to simply remove it and rely on the checks already present in the sleepable allocation paths used by this function. While here, remove another unnecessary witness check in bus_dma_tag_create (the tag is always allocated with M_NOWAIT), and fix a couple of typos. Reported by: cem Reviewed by: kib, cem MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25107 Modified: head/sys/x86/x86/busdma_bounce.c head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Tue Jun 2 22:57:13 2020 (r361740) +++ head/sys/x86/x86/busdma_bounce.c Wed Jun 3 00:16:36 2020 (r361741) @@ -407,8 +407,6 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad vm_memattr_t attr; int mflags; - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s", __func__); - if (flags & BUS_DMA_NOWAIT) mflags = M_NOWAIT; else @@ -492,7 +490,7 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad } /* - * Free a piece of memory and it's allociated dmamap, that was allocated + * Free a piece of memory and its associated dmamap, that was allocated * via bus_dmamem_alloc. Make the same choice for free/contigfree. */ static void Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Tue Jun 2 22:57:13 2020 (r361740) +++ head/sys/x86/x86/busdma_machdep.c Wed Jun 3 00:16:36 2020 (r361741) @@ -223,8 +223,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al struct bus_dma_tag_common *tc; int error; - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s", __func__); - if (parent == NULL) { error = bus_dma_bounce_impl.tag_create(parent, alignment, boundary, lowaddr, highaddr, filter, filterarg, maxsize,