From patchwork Tue Jun 21 04:34:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 9189395 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 42F5860756 for ; Tue, 21 Jun 2016 04:37:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30BF427F96 for ; Tue, 21 Jun 2016 04:37:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2548927F9A; Tue, 21 Jun 2016 04:37:14 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 0847427F96 for ; Tue, 21 Jun 2016 04:37:13 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFDPX-0001K8-1b; Tue, 21 Jun 2016 04:35:39 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFDPF-0008Ol-47 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2016 04:35:21 +0000 Received: by mail-pa0-x235.google.com with SMTP id bz2so2189197pad.1 for ; Mon, 20 Jun 2016 21:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qIfgm3nj67HJcPBlZ5wjzeK3tbef+9dY+m0oXygwWIQ=; b=Tua69kLR7FWfVyZkVCr43FIRQAznI62EN4Pfck5Wxuu3izUAk2xFnBHYzdQ9u2MVrK fgaY1P98EQI0CtpdY+Mxrn1a2IevBv3lC6nAfdVgRI+IY3vt/D4d6kQHJPMDQ+6L3SQy 6wEfLzyH5tySRdOHDE3ZWN6jSElfSVQaoBZhA= 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=qIfgm3nj67HJcPBlZ5wjzeK3tbef+9dY+m0oXygwWIQ=; b=myMne57OO8GgnwZ4jqQhhBldUwJ/633rYMduYn9U+P036XV2yJ2LmR//ivhTigVYnF HbGW0TNC4n2WWKjfzP5CBun+rPB7kJIrzjKvbOBCkDRaiELMXAkyiKFWYm6sDahL7tpL htYTzp83RpgnG0kNMVG+Exct0Jtg8yOC4YOl011shFvMDpiU6GZjHQbfQ7AUb9v4AvXt YCG86rdBdT1aAh7Sji/QzO0IhRNu1H/WxlXyBQ/VkKWF2QVxfqaqGZGhVkjCQuOgXgc/ FhGbr1og09wcYZrRzgTCRxl+iY47BZZe7dwC6kgAx2Sqv+ijNGXm53evn2V/l7iYvwDn tRkA== X-Gm-Message-State: ALyK8tKi1ON3XeUvICkwXGiwnzK5qs39jweEIlc+uPTI69WF3CXGy8FSRjVdV0pXKw9F0FuX X-Received: by 10.66.167.103 with SMTP id zn7mr25641346pab.149.1466483700278; Mon, 20 Jun 2016 21:35:00 -0700 (PDT) Received: from basement.tok.corp.google.com ([100.103.3.207]) by smtp.gmail.com with ESMTPSA id s3sm24500160pfb.87.2016.06.20.21.34.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 21:34:59 -0700 (PDT) From: Tomasz Figa To: iommu@lists.linux-foundation.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 2/8] iommu/rockchip: Add map_sg callback for rk_iommu_ops Date: Tue, 21 Jun 2016 13:34:35 +0900 Message-Id: <1466483681-36110-3-git-send-email-tfiga@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1466483681-36110-1-git-send-email-tfiga@chromium.org> References: <1466483681-36110-1-git-send-email-tfiga@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_213521_239695_2D88E520 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , David Airlie , Joerg Roedel , linux-kernel@vger.kernel.org, Daniel Kurtz , Tomasz Figa , linux-rockchip@lists.infradead.org, Simon Xue , Marek Szyprowski , Shunqian Zheng , linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Simon Xue 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 Xue Signed-off-by: Shunqian Zheng Reviewed-on: https://chromium-review.googlesource.com/346326 Reviewed-by: Douglas Anderson Signed-off-by: Tomasz Figa --- 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 5a9659a..53fa0d9 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,