]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove unnecessary WITNESS check in x86 bus_dma
authorJason A. Harmening <jah@FreeBSD.org>
Wed, 3 Jun 2020 00:16:36 +0000 (00:16 +0000)
committerJason A. Harmening <jah@FreeBSD.org>
Wed, 3 Jun 2020 00:16:36 +0000 (00:16 +0000)
commit1dccf71b4b6dca1a912f3085918239559498c508
treeed74da6e3fd8c90ff29a031631d85bc321bb46db
parentdfd4db9333c1df08f748cc8716ac2c2cd74f9b91
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
sys/x86/x86/busdma_bounce.c
sys/x86/x86/busdma_machdep.c