Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2019 01:13:32 -0800
From:      Jason Harmening <jason.harmening@gmail.com>
To:        FreeBSD Arch <freebsd-arch@freebsd.org>
Subject:   Any desire for a more flexible bus_dmamem_alloc variant ?
Message-ID:  <ee0a8333-e5e8-0b4e-e5bd-7b1ad5410847@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi everyone,

It's really bugged me for years that bus_dmamem_alloc() just uses the 
tag's maximum size instead of allowing a size to be passed in.  I got 
reminded of this again recently when looking over some busdma code.

I know others have voiced this complaint in the past: 
https://lists.freebsd.org/pipermail/freebsd-current/2012-July/035281.html

I used to work on an out-of-tree driver that could've benefited from 
something like this.  It also seems like the benefits of using 
bus_dmamem_alloc() to always do the optimal thing instead of, say, 
rolling your own using kmem_alloc_[attr|contig] will increase as we 
adopt support for IOMMUs.

I'd like to see if there's any interest in adding a 
bus_dmamem_alloc_attr() KPI that takes both a size and vm_memattr_t. 
Are there any potential in-tree consumers of such a thing?

--Jason




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ee0a8333-e5e8-0b4e-e5bd-7b1ad5410847>