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: 9189383 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 E1F8C60756 for ; Tue, 21 Jun 2016 04:36:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D029927F96 for ; Tue, 21 Jun 2016 04:36:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4E8927F9A; Tue, 21 Jun 2016 04:36:36 +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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78FC927F96 for ; Tue, 21 Jun 2016 04:36:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 39FA96E1FC; Tue, 21 Jun 2016 04:36:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 210086E1E5 for ; Tue, 21 Jun 2016 04:35:01 +0000 (UTC) Received: by mail-pa0-x230.google.com with SMTP id b13so2222217pat.0 for ; Mon, 20 Jun 2016 21:35:01 -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=I1y9ArfhHZTW0MvSo8rFnNMF/OznGMrB4EST2a6JZxXT9MTqRNa184amXqWHYof3Ne RC/kjoMqeOP3O5wPPvhzE37RH/kIeuj9haeyMAhyEO0vy+vpL7WvfiAzHBa2Ji4Wk47V o+KVaYXVaxT29CCHE0j5Ktstoi3sRBgghQGD5bp2EcGNLB1rIvP6P3K9HqhpwJ8CnVwk iLq3IUHUDISXUBUUi7/klFieidjUdDSDayEloVjwmr7pkK0P/nmQzFXqK9s2jOEXsJNE NXdlUTWBw1NH01It5X4SFLcT9Yq0cY5QsUgQ4nqg6Uu++uUrlAmTaUYXnglwk5ihLVCg tNyQ== X-Gm-Message-State: ALyK8tIRuy0qGsK1rw3yrFOmLrY8XGuV4NGcqr/vYpgUacjQe4RKcQrR0a42gCxVMgzKdZA4 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> Cc: linux-kernel@vger.kernel.org, Tomasz Figa , linux-rockchip@lists.infradead.org, Simon Xue , Marek Szyprowski , Shunqian Zheng , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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,