From: Vladimir Murzin <vladimir.murzin@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux@armlinux.org.uk, sza@esh.hu,
arnd@arndb.de, gregkh@linuxfoundation.org,
akpm@linux-foundation.org, alexandre.torgue@st.com,
robin.murphy@arm.com, kbuild-all@01.org,
benjamin.gaignard@linaro.org, hch@lst.de,
m.szyprowski@samsung.com
Subject: [PATCH 2/2] fixup: ARM: NOMMU: Introduce dma operations for noMMU
Date: Wed, 28 Jun 2017 10:16:58 +0100 [thread overview]
Message-ID: <1498641418-3554-3-git-send-email-vladimir.murzin@arm.com> (raw)
In-Reply-To: <1498641418-3554-1-git-send-email-vladimir.murzin@arm.com>
dma_common_mmap() is already available for NOMMU, so there is no point
to carry own version. Moreover, existent implementation relies on
dma-noop provides mmap, but it is not true anymore.
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
arch/arm/mm/dma-mapping-nommu.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c
index 6adc02f..90ee354 100644
--- a/arch/arm/mm/dma-mapping-nommu.c
+++ b/arch/arm/mm/dma-mapping-nommu.c
@@ -71,23 +71,6 @@ static void arm_nommu_dma_free(struct device *dev, size_t size,
return;
}
-static int arm_nommu_dma_mmap(struct device *dev, struct vm_area_struct *vma,
- void *cpu_addr, dma_addr_t dma_addr, size_t size,
- unsigned long attrs)
-{
- const struct dma_map_ops *ops = &dma_noop_ops;
- int ret;
-
- if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret))
- return ret;
-
- if (attrs & DMA_ATTR_NON_CONSISTENT)
- return ops->mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
-
- WARN_ON_ONCE(1);
- return -ENXIO;
-}
-
static void __dma_page_cpu_to_dev(phys_addr_t paddr, size_t size,
enum dma_data_direction dir)
{
@@ -190,7 +173,6 @@ static void arm_nommu_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist
const struct dma_map_ops arm_nommu_dma_ops = {
.alloc = arm_nommu_dma_alloc,
.free = arm_nommu_dma_free,
- .mmap = arm_nommu_dma_mmap,
.map_page = arm_nommu_dma_map_page,
.unmap_page = arm_nommu_dma_unmap_page,
.map_sg = arm_nommu_dma_map_sg,
--
2.0.0
next prev parent reply other threads:[~2017-06-28 9:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 9:16 [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU" Vladimir Murzin
2017-06-28 9:16 ` [PATCH 1/2] drivers: dma-mapping: allow dma_common_mmap() for NOMMU Vladimir Murzin
2017-06-28 9:16 ` Vladimir Murzin [this message]
2017-06-28 13:52 ` [PATCH 0/2] Follow-up on "ARM: Fix dma_alloc_coherent() and friends for NOMMU" Christoph Hellwig
2017-07-03 8:49 ` Vladimir Murzin
2017-07-03 8:54 ` Vladimir Murzin
2017-06-30 11:36 ` Benjamin Gaignard
2017-06-30 11:59 ` Vladimir Murzin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498641418-3554-3-git-send-email-vladimir.murzin@arm.com \
--to=vladimir.murzin@arm.com \
--cc=akpm@linux-foundation.org \
--cc=alexandre.torgue@st.com \
--cc=arnd@arndb.de \
--cc=benjamin.gaignard@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=kbuild-all@01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
--cc=sza@esh.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®