Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4076450yba; Tue, 9 Apr 2019 10:35:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJ/UWoSpSJ8n60J3bSXrjRK0ZfMKzqAVWCDkqu+gsG/nfLPanay9EhIEGJd0cZ0M6gjf+f X-Received: by 2002:a17:902:7885:: with SMTP id q5mr39031512pll.12.1554831350865; Tue, 09 Apr 2019 10:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554831350; cv=none; d=google.com; s=arc-20160816; b=H7hSAWpBc2175v4fP9QAFdijHub4+7AtLe8XNUaWxw0rtVm0CdfTzde/lVKMGV28No DtFBfCWmnfcsWiikcvyRJekZnfK4HCvMWRlceK4t4Up4giImUIjULziGpLA3mglu8h58 eK6SwDv2/wuQ1k0n4Prtox7CZaPmmOZfM/BQMR4cmddRMDA0m07Shxqo0jnlt0+M6Vxw VmcMcpfw0nGAYhtXjp8imma40cWK2EVwoi9b6qWZuAopBXyUAoyq7Ijf+vI7VZ/Blmm+ s0wMBpgzYvw3WbbzBOdCBVMF+yO3SCiuhqrrvKbEcTGKITeSI0Lybr2f5H/krFlWosXq QDxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=lYHF43clyK/JWS/DSDeCPrKgGWXyH1SXmIh0VjgPaaY=; b=AVX5ytEJDuIxAGNYj+g51GneEItuNGy5EGBqGvayUZkwzuuSsFhMxSdXW71DiOjOAR u6xF5pQXdNYUczqTswFMpgq1cIIJV87ZNcxBci3Vpx3m9Ufpdv8tG4bEZNCjQTiYyztP FLMfxHwhiGxoW5C1P7dcHj+gxztMHBUkABjilKMKnoVo5NJaMNl/BfNNTG24M3UqZRsT /Bjheov5r6CzTfUePLL2ln1PFR8MoOQIijiFQidX03nhoHBI3phA6mJwtBtoZCsd7jGG RZqF3GqTr7GEUsioMDqEtcUnONHG3T3olVzMW6CQWmUaRwrULl2hI4Gg9Tc/QxfijLqz 51JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si29404861pll.291.2019.04.09.10.35.33; Tue, 09 Apr 2019 10:35:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726629AbfDIRdd (ORCPT + 99 others); Tue, 9 Apr 2019 13:33:33 -0400 Received: from foss.arm.com ([217.140.101.70]:42076 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbfDIRdd (ORCPT ); Tue, 9 Apr 2019 13:33:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F164215BE; Tue, 9 Apr 2019 10:33:32 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 98C3F3F59C; Tue, 9 Apr 2019 10:33:31 -0700 (PDT) Subject: Re: [PATCH 07/21] dma-iommu: move the arm64 wrappers to common code To: Christoph Hellwig Cc: Joerg Roedel , Catalin Marinas , Will Deacon , Tom Lendacky , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20190327080448.5500-1-hch@lst.de> <20190327080448.5500-8-hch@lst.de> <67573dd3-72c7-692d-bc1a-7edb49ff9551@arm.com> <20190409172309.GD14679@lst.de> From: Robin Murphy Message-ID: Date: Tue, 9 Apr 2019 18:33:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190409172309.GD14679@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/04/2019 18:23, Christoph Hellwig wrote: > On Tue, Apr 09, 2019 at 04:07:02PM +0100, Robin Murphy wrote: >>> -static inline int iommu_dma_init(void) >>> +static inline void iommu_setup_dma_ops(struct device *dev, u64 dma_base, >>> + u64 size, const struct iommu_ops *ops) >>> { >>> - return 0; >>> } >> >> I don't think it makes sense to have a stub for that - AFAICS it should >> only ever be called form arch code with an inherent "select IOMMU_DMA" >> (much like the stuff which isn't stubbed currently). >> >> Otherwise, I'm about 97% sure the rest of the move looks OK - thanks for >> splitting things up. > > arm64 only selects IOMMU_DMA if IOMMU_SUPPORT is selected, which can > be disabled. So to keep some (unusual) arm64 configs compiling we'll need > the stub.. Urgh, right, it worked out before because arm64 stubbed its own caller of iommu_dma_init_domain() internally... Oh well - I guess there's no nicer alternative, and we have always treated arch_setup_dma_ops() that way. Robin.