svn commit: r361741 - head/sys/x86/x86
Jason A. Harmening
jah at FreeBSD.org
Wed Jun 3 00:16:37 UTC 2020
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,
More information about the svn-src-all
mailing list