aboutsummaryrefslogtreecommitdiff
path: root/sys/x86
diff options
context:
space:
mode:
authorJason A. Harmening <jah@FreeBSD.org>2020-06-03 00:16:36 +0000
committerJason A. Harmening <jah@FreeBSD.org>2020-06-03 00:16:36 +0000
commit1dccf71b4b6dca1a912f3085918239559498c508 (patch)
treeed74da6e3fd8c90ff29a031631d85bc321bb46db /sys/x86
parentdfd4db9333c1df08f748cc8716ac2c2cd74f9b91 (diff)
downloadsrc-1dccf71b4b6dca1a912f3085918239559498c508.tar.gz
src-1dccf71b4b6dca1a912f3085918239559498c508.zip
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
Notes
Notes: svn path=/head/; revision=361741
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/busdma_bounce.c4
-rw-r--r--sys/x86/x86/busdma_machdep.c2
2 files changed, 1 insertions, 5 deletions
diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c
index 1a9168b981e9..01ad5be99932 100644
--- a/sys/x86/x86/busdma_bounce.c
+++ b/sys/x86/x86/busdma_bounce.c
@@ -407,8 +407,6 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags,
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** vaddr, int flags,
}
/*
- * 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
diff --git a/sys/x86/x86/busdma_machdep.c b/sys/x86/x86/busdma_machdep.c
index 36c8d1f78315..3442313f55c8 100644
--- a/sys/x86/x86/busdma_machdep.c
+++ b/sys/x86/x86/busdma_machdep.c
@@ -223,8 +223,6 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
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,