For PCI (but really should do this for a device) we store device
private dma information like the DMA masks. Given is this currently
local to the implementation we cannot easily access that information.
Add a LinuxKPI private function to query the dma mask. This will be
used in page_pools to avoid allocating pages which will then need
excessive busdma bounce support (which quickly keels over even on amd64
currently [*]) but rather allows us to use an attribute to limit pages to
GPF_DMA32. The reason we can implement this there but were not able to
do so with skbuffs is because page pools can have a cached copy of the
device pointer which skbuffs cannot.
This implementation is used as a stopgap as it is unclear how a proper
Linux interface to this looks like (likely some direct access to entirely
different code).
- Observed with mt76 by the logging implemented in LinuxKPI and the
sysctl counter: compat.linuxkpi.lkpi_pci_nseg1_fail: 8951
Sponsored by: The FreeBSD Foundation
MFC after: 3 days