From patchwork Mon May 23 01:37:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shunqian Zheng X-Patchwork-Id: 9131031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 94D84607D3 for ; Mon, 23 May 2016 01:38:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82C732810E for ; Mon, 23 May 2016 01:38:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75CEA281E3; Mon, 23 May 2016 01:38:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6409F2810E for ; Mon, 23 May 2016 01:38:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4eoo-00065W-57; Mon, 23 May 2016 01:38:06 +0000 Received: from mail-pa0-f65.google.com ([209.85.220.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b4eom-00062M-A5 for linux-rockchip@lists.infradead.org; Mon, 23 May 2016 01:38:04 +0000 Received: by mail-pa0-f65.google.com with SMTP id rw9so16398154pab.2 for ; Sun, 22 May 2016 18:37:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8aMAYlqA5Kr3/8HDyPvoe5IKVpB8GlrtwUPZ6PJZuaU=; b=Stt/P9soUPqKuiliQtwnXkNV7+u6YcbrgnrsYHFaNiVdYMYddTb/9iEoePfVmbg/Jx LvWRAOINlCtafVhvk7mpuNEariec+5r/0pFN9LakB2L5eFdOLM2mQ6WCWKaQ4AIsk61u qcqjLq5BFwtjCRynILRGmF31aeKKmThkX2uFsxx26oV3zOC+Uf9cwbRy5kyvOJfwVTZ/ q0RPJ9B3JjBOVuKPWCHHtZ5PSFwSlr3aGJuvlODPD2gImDAZNQ2JLVHFeOhB3i+aFMtX hdt7fdSxq7iFRAnjyUJNWhP1SKvoy1ReFtw4EpST+naUMtzGIx7GlgLBOW8PWXdzkru2 VqrA== X-Gm-Message-State: AOPr4FVHpP1VPtnINVmaaFuCDensLO3Jw5MlKXGeRbnzOGTPPHNAlYz8/S1dEyZhs6dzVg== X-Received: by 10.67.13.144 with SMTP id ey16mr23444854pad.147.1463967465741; Sun, 22 May 2016 18:37:45 -0700 (PDT) Received: from SHUNQIAN-W530.example.org ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id x89sm41909004pfa.87.2016.05.22.18.37.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 May 2016 18:37:45 -0700 (PDT) From: Shunqian Zheng To: joro@8bytes.org, heiko@sntech.de Subject: [PATCH 2/5] iommu/rockchip: add map_sg callback for rk_iommu_ops Date: Mon, 23 May 2016 09:37:16 +0800 Message-Id: <1463967439-13354-3-git-send-email-zhengsq@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463967439-13354-1-git-send-email-zhengsq@rock-chips.com> References: <1463967439-13354-1-git-send-email-zhengsq@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160522_183804_401512_7EDB93C2 X-CRM114-Status: UNSURE ( 8.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Simon MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Simon The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to rockchip iommu accordingly. Signed-off-by: Simon --- drivers/iommu/rockchip-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index ec0ce62..3c16ec3 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1022,6 +1022,7 @@ static const struct iommu_ops rk_iommu_ops = { .detach_dev = rk_iommu_detach_device, .map = rk_iommu_map, .unmap = rk_iommu_unmap, + .map_sg = default_iommu_map_sg, .add_device = rk_iommu_add_device, .remove_device = rk_iommu_remove_device, .iova_to_phys = rk_iommu_iova_to_phys,