|
|
Log in / Subscribe / Register

dma-mapping: introduce a new dma api

From:  Laurentiu Tudor <laurentiu.tudor-AT-nxp.com>
To:  "hch-AT-lst.de" <hch-AT-lst.de>, "joro-AT-8bytes.org" <joro-AT-8bytes.org>, Ioana Ciocoi Radulescu <ruxandra.radulescu-AT-nxp.com>, "linux-kernel-AT-vger.kernel.org" <linux-kernel-AT-vger.kernel.org>, "iommu-AT-lists.linux-foundation.org" <iommu-AT-lists.linux-foundation.org>, "netdev-AT-vger.kernel.org" <netdev-AT-vger.kernel.org>, Ioana Ciornei <ioana.ciornei-AT-nxp.com>
Subject:  [RFC PATCH 0/3] dma-mapping: introduce a new dma api
Date:  Tue, 22 Oct 2019 12:55:12 +0000
Message-ID:  <20191022125502.12495-1-laurentiu.tudor@nxp.com>
Cc:  Leo Li <leoyang.li-AT-nxp.com>, "robin.murphy-AT-arm.com" <robin.murphy-AT-arm.com>, Diana Madalina Craciun <diana.craciun-AT-nxp.com>, "davem-AT-davemloft.net" <davem-AT-davemloft.net>, Madalin-cristian Bucur <madalin.bucur-AT-nxp.com>, Laurentiu Tudor <laurentiu.tudor-AT-nxp.com>
Archive-link:  Article

From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

This series introduces a new dma api called dma_addr_to_phys_addr()
that converts a dma address to the corresponding physical address.
It consists in a new dma map op and the wrapper api, both added
in the first patch. The second patch adds an implementation in the
iommu dma glue code and wires it up. The third patch updates a driver
to use the new api.

Note: Originally i wanted to use the simpler api name dma_to_phys()
but it's already used in the dma direct apis. It would be great if
there would be a solution (unifying them?) to use this nicer naming.

Context: https://lkml.org/lkml/2019/5/31/684

Laurentiu Tudor (3):
  dma-mapping: introduce a new dma api dma_addr_to_phys_addr()
  iommu/dma: wire-up new dma op dma_addr_to_phys_addr()
  dpaa2_eth: use dma_addr_to_phys_addr() new dma api

 drivers/iommu/dma-iommu.c                     | 12 +++++++++++
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  | 21 +++++++------------
 .../net/ethernet/freescale/dpaa2/dpaa2-eth.h  |  1 -
 include/linux/dma-mapping.h                   | 21 +++++++++++++++++++
 4 files changed, 40 insertions(+), 15 deletions(-)

-- 
2.17.1



Copyright © 2019, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds