Merge branch 'pagepool-api-and-dma-address-storage'
authorDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 06:00:17 +0000 (22:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 06:00:17 +0000 (22:00 -0800)
commit30580b33a21bfb37ef825b786c411b167baebd24
tree148c75447c7e21ea390e5cd357304d8c76c86fb0
parentfb14b096355b8c947a256e8e5259a4ebaca00866
parent13f16d9d4ab7fccc918aafb146ea043be9574d49
Merge branch 'pagepool-api-and-dma-address-storage'

Jesper Dangaard Brouer says:

====================
Fix page_pool API and dma address storage

As pointed out by David Miller in [1] the current page_pool implementation
stores dma_addr_t in page->private. This won't work on 32-bit platforms with
64-bit DMA addresses since the page->private is an unsigned long and the
dma_addr_t a u64.

Since no driver is yet using the DMA mapping capabilities of the API let's
fix this by storing the information in 'struct page' and use that to store
and retrieve DMA addresses from network drivers.

As long as the addresses returned from dma_map_page() are aligned the first
bit, used by the compound pages code should not be set.

Ilias tested the first two patches on Espressobin driver mvneta, for which
we have patches for using the DMA API of page_pool.

[1]: https://lore.kernel.org/netdev/20181207.230655.1261252486319967024.davem@davemloft.net/
====================

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>