I took the implementation from OpenBSD, commit d55ef580b1748517027c3eabdb715316ca5b1442. The only difference is the addition of `dma_buf_map_is_equal()`. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D36963