Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hdoyu@nvidia.com (Hiroshi Doyu)
To: linux-arm-kernel@lists.infradead.org
Subject: [v3 1/1] ARM: dma-mapping: Set arm_dma_set_mask() for iommu->set_dma_mask()
Date: Tue, 29 Jan 2013 14:57:07 +0200	[thread overview]
Message-ID: <1359464227-19669-1-git-send-email-hdoyu@nvidia.com> (raw)
In-Reply-To: <5107C4DE.7060607@samsung.com>

struct dma_map_ops iommu_ops doesn't have ->set_dma_mask, which causes
crash when dma_set_mask() is called from some driver.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
---
 arch/arm/mm/dma-mapping.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 6b2fb87..5dfc71f 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1730,6 +1730,8 @@ struct dma_map_ops iommu_ops = {
 	.unmap_sg		= arm_iommu_unmap_sg,
 	.sync_sg_for_cpu	= arm_iommu_sync_sg_for_cpu,
 	.sync_sg_for_device	= arm_iommu_sync_sg_for_device,
+
+	.set_dma_mask		= arm_dma_set_mask,
 };
 
 struct dma_map_ops iommu_coherent_ops = {
@@ -1743,6 +1745,8 @@ struct dma_map_ops iommu_coherent_ops = {
 
 	.map_sg		= arm_coherent_iommu_map_sg,
 	.unmap_sg	= arm_coherent_iommu_unmap_sg,
+
+	.set_dma_mask	= arm_dma_set_mask,
 };
 
 /**
-- 
1.7.9.5

      reply	other threads:[~2013-01-29 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28  8:33 [RFC] ARM: dma-mapping: Return 0 if no ->set_dma_mask() Hiroshi Doyu
2013-01-29 11:31 ` Marek Szyprowski
2013-01-29 12:27   ` [v2 1/1] ARM: dma-mapping: Call arm_dma_set_mask() " Hiroshi Doyu
2013-01-29 12:47     ` Marek Szyprowski
2013-01-29 12:57       ` Hiroshi Doyu [this message]

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=1359464227-19669-1-git-send-email-hdoyu@nvidia.com \
    --to=hdoyu@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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