From patchwork Tue Mar 15 17:04:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 8590531 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 84EE99F44D for ; Tue, 15 Mar 2016 17:02:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F18B420254 for ; Tue, 15 Mar 2016 17:02:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0194202FE for ; Tue, 15 Mar 2016 17:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934571AbcCORBY (ORCPT ); Tue, 15 Mar 2016 13:01:24 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:36018 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932591AbcCORBW (ORCPT ); Tue, 15 Mar 2016 13:01:22 -0400 Received: by mail-pf0-f171.google.com with SMTP id u190so36194682pfb.3; Tue, 15 Mar 2016 10:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=WuSKsbE8DTy8gK/Zus0I+vW1FE2Kwp274bDbm7BKzXw=; b=IUb/zYa/4z+WIWF2aMZxwii1riM9aartoVPSk9u6AeTMZDuH9gdMqCLFdu3ePWZr1T XwRYJTMt1CXhbtOID3cNOds4goVR8G6GGjGaLQfc+dw4H0tkhXvEezTgl7elQ/k7PaiI l+0eLFarNPgNzv7xxBpwvJUWWKpIaZDjYJWKFZydHV9CFFjtHSDP/sTP6L1NqycDej2t TfNuyTcaPGmok6NfCIR1d2kAG3+swgeyTaucSVUgzaVksk3IJ7sUsekFQvBzrKWSC/Mw AWCKhzD889jVGCFIn/bgKIgwITb63Q0C9/0Txy4mNt8GL+f30lyTIRnqQSDLbydsl/y+ xWCw== 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:date:message-id:in-reply-to :references:subject; bh=WuSKsbE8DTy8gK/Zus0I+vW1FE2Kwp274bDbm7BKzXw=; b=VvFTw553Or5LYkcdJpDyBUSkKKyIMuiMRsKnuNSHoxX7Rg48fuAWuJHJdH0mKHpfPX WA6oj2SyLVd6tclOfPdvUsBhBeBBFiiLwdQ33Rue5+DSYXFE/PUMp5wyNBFOSgO0uqPw +LQWidEGGREdI8B64Fz7inx8o4B5qFlwn8zIrIty8EXDqZNYa9bAp0ZOFdUYUgXvsOOu DvFwk6rsK6RocyCW/lvrTsRFqjgE8U/uP1ru3mvxcLPVVsbibe775kfP07+XKedTIfIV DWxMnELlxnIVmBHTSCAYGaUe5AnNImk3qUX6gGfud1m+vl93t8e47/aVqTVBSIiKGIGK Duvg== X-Gm-Message-State: AD7BkJKHZjWxGHKoxsf8nNvgkcSxjpwCa30t7BRwONJaKkhs8gjyCAMj5YJRjT8TMlqJdA== X-Received: by 10.98.13.216 with SMTP id 85mr39552496pfn.143.1458061280719; Tue, 15 Mar 2016 10:01:20 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id d81sm40900977pfj.77.2016.03.15.10.01.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Mar 2016 10:01:19 -0700 (PDT) From: Magnus Damm To: iommu@lists.linux-foundation.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, joro@8bytes.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, horms+renesas@verge.net.au, Magnus Damm , robin.murphy@arm.com, m.szyprowski@samsung.com Date: Wed, 16 Mar 2016 02:04:41 +0900 Message-Id: <20160315170441.20615.78167.sendpatchset@little-apple> In-Reply-To: <20160315170431.20615.30333.sendpatchset@little-apple> References: <20160315170431.20615.30333.sendpatchset@little-apple> Subject: [PATCH 01/04] iommu/ipmmu-vmsa: 32-bit ARM may have CONFIG_IOMMU_DMA=y Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Instead of assuming that CONFIG_ARM=y also means CONFIG_IOMMU_DMA=n, convert the #ifdefs to take CONFIG_IOMMU_DMA into consideration so 32-bit ARM can make use of CONFIG_IOMMU_DMA=y as well once those bits are in place. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 0007/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2016-03-15 21:05:40.590513000 +0900 @@ -22,7 +22,7 @@ #include #include -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA) #include #include #endif @@ -40,7 +40,7 @@ struct ipmmu_vmsa_device { DECLARE_BITMAP(ctx, IPMMU_CTX_MAX); struct ipmmu_vmsa_domain *domains[IPMMU_CTX_MAX]; -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA) struct dma_iommu_mapping *mapping; #endif }; @@ -619,7 +619,7 @@ static int ipmmu_find_utlbs(struct ipmmu return 0; } -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA) static int ipmmu_map_attach(struct device *dev, struct ipmmu_vmsa_device *mmu) { int ret;