From patchwork Wed Nov 19 11:15:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 41130 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2A6EB20CBB for ; Wed, 19 Nov 2014 11:16:33 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id ex7sf543714wid.7 for ; Wed, 19 Nov 2014 03:16:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=ytpR6cNeXcUeRb3KsPMw64p54j4o5p/MrNxChZP/dMs=; b=NIqhypr447Q+JbQieqxCg1WE7MeKiik+1mEi6tMvd8CVdhhWP9/td+SGZ0xSCulIHz aouhPo0V+wAryY8xcJvXfKLpI9uutBHipakvirznKtAsxQhNwVw4/cLvh9FcA6ywCo66 1SAfIHDtLm2oeBsXpQes9aIXIRFTiIlmxrLwlOF9vn0q3XyPGXM3NrfIyfWCkyujoQVB g2xEnlER7bDU30oM+q4/kt2i6QhxPcBSw3do/HvDEqRmFzYmIrIkX8ev7MigArlF7Awf PgUn06NddaeshMAxNvuLa1uBjJfxxGvHDq3RJsFsfhpmGtoxf/QEN+PXWRZ5SWr9flP2 t/CQ== X-Gm-Message-State: ALoCoQl4In8cSl/QXyn8Gf9r0buPMR6U782Cn0cy5EZ4QfdHIlwTTkvEdOGEHYMpeZ0DPCZgQcZr X-Received: by 10.112.188.199 with SMTP id gc7mr11170074lbc.6.1416395792050; Wed, 19 Nov 2014 03:16:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.7 with SMTP id 7ls828253laq.88.gmail; Wed, 19 Nov 2014 03:16:31 -0800 (PST) X-Received: by 10.112.172.97 with SMTP id bb1mr4733126lbc.38.1416395791908; Wed, 19 Nov 2014 03:16:31 -0800 (PST) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id p10si1408967lap.125.2014.11.19.03.16.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 03:16:31 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by mail-la0-f44.google.com with SMTP id ge10so299166lab.17 for ; Wed, 19 Nov 2014 03:16:31 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr4856408lbc.34.1416395791824; Wed, 19 Nov 2014 03:16:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp64269lbc; Wed, 19 Nov 2014 03:16:31 -0800 (PST) X-Received: by 10.66.191.135 with SMTP id gy7mr45246494pac.95.1416395788222; Wed, 19 Nov 2014 03:16:28 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xo9si2087857pbc.210.2014.11.19.03.16.27 for ; Wed, 19 Nov 2014 03:16:28 -0800 (PST) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbaKSLQ0 (ORCPT + 4 others); Wed, 19 Nov 2014 06:16:26 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:24992 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbaKSLQ0 (ORCPT ); Wed, 19 Nov 2014 06:16:26 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFA00MLJA45K540@mailout1.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 19 Nov 2014 11:19:17 +0000 (GMT) X-AuditID: cbfec7f4-b7f6c6d00000120b-85-546c7c074473 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id CB.E6.04619.70C7C645; Wed, 19 Nov 2014 11:16:23 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NFA00GC59YMTL30@eusync1.samsung.com>; Wed, 19 Nov 2014 11:16:23 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , linaro-mm-sig@lists.linaro.org, Arnd Bergmann , Shaik Ameer Basha , Cho KyongHo , Joerg Roedel , Thierry Reding , Olof Johansson , Laurent Pinchart , Rob Herring , Will Deacon , David Wodhouse , Inki Dae , Kukjin Kim , Tomasz Figa , Kyungmin Park Subject: [PATCH v3 03/19] arm: dma-mapping: add missing check for iommu Date: Wed, 19 Nov 2014 12:15:32 +0100 Message-id: <1416395748-10731-4-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> References: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsVy+t/xy7rsNTkhBn9ea1v8nXSM3WLiysnM FpPuT2CxWLDf2qJz9gZ2i94FV9kszja9YbfonLiE3eLLlYdMFpseX2O1mHF+H5PF2iN32S1O Xf/MZvGv9yCjxf89O9gtjjzczW6xatcfRovbv/ksXn48weIg7PHk4DwmjzXz1jB6/P41idFj 56y77B6zO2ayemxeoeWxaVUnm8fmJfUet/89ZvaYfGM5o8eVE02sHr3N79g8+rasYvT4vEku gC+KyyYlNSezLLVI3y6BK2Nm3wvGgo1sFZ/b97M1MG5h7WLk5JAQMJH4vPMulC0mceHeerYu Ri4OIYGljBKbFqxihnD6mCQ+N19lA6liEzCU6HrbBWaLCORLvNj7lwXEZhZ4wyJxb5MhiC0s 4C6x4FY3I4jNIqAqMfX1eXYQm1fAQ+LL0SnMENvkJP6/XMHUxcjBwSngKXH9BdgYIaCSpunr WCcw8i5gZFjFKJpamlxQnJSea6hXnJhbXJqXrpecn7uJERIfX3YwLj5mdYhRgINRiYe3oTgn RIg1say4MvcQowQHs5IIb3EhUIg3JbGyKrUoP76oNCe1+BAjEwenVAOjss+zxI2zfj03ZXvf pHJ3n1vg12Xrb4WVqH9jf/Pi3+1v3zJmHjCbsKAqi6nG7XTb7bP9fnmXT/nsmPh+jlvz8bo1 FXnbbznLZ/9YXNrulev2syL8hsNdqcmGaa8PPVVs4D8gn8hcX5WZ9/vqZyvpjDzdl1vF1b6I xC47sUNJX+bOHB/3k/dTlViKMxINtZiLihMBD4TnPG0CAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , There is no point trying to initialize dma_ops with arm_get_iommu_dma_map_ops() if no iommu has been provided. Signed-off-by: Marek Szyprowski --- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index f15eae5e0513..68040fd62166 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -2050,7 +2050,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, { struct dma_map_ops *dma_ops; - if (arm_setup_iommu_dma_ops(dev, dma_base, size, iommu)) + if (iommu && arm_setup_iommu_dma_ops(dev, dma_base, size, iommu)) dma_ops = arm_get_iommu_dma_map_ops(coherent); else dma_ops = arm_get_dma_map_ops(coherent);