Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8454687imu; Thu, 15 Nov 2018 11:51:16 -0800 (PST) X-Google-Smtp-Source: AJdET5fpk0LLE6GS9Gyzm9rZutziZTWLmhxM7rFBaBFVB3BUcQfOmrl4p2OMRjpo2bWQoGFvRSUH X-Received: by 2002:a62:2901:: with SMTP id p1-v6mr2889832pfp.109.1542311476129; Thu, 15 Nov 2018 11:51:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542311476; cv=none; d=google.com; s=arc-20160816; b=NkVYr4IuzjYCv5PAly8zhGfBQCYa9XiUu8JyLiiTqlhKr3KZsTTF7uUByoCH/bbpSe F2WN/oB+eUzs7D/z5L0AElqLKCDJf9NbLCdYnunit2MCemgyPTNrA8RJDMVaB9qUlmza 5X7Efywc6QTFiBNrzjFkRtvgqOCOndJIM2QtNNYWYkhY4ndnWH27c4wmqoegPgioHzUV Rs4hqJ+xdIttdeAkhOuX6kT9kuAYjJ9WEpDscWBq61+XLp1XmYPtLVCa0WAkARG6Fwmz pO3NtEHXXy2wYP+qh7SnrMh62C0uyw8PToiDOQzMPXmoVPuFuUvkfWxBpnCnkoJELtyh CYtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=BnYf6COlyXXbrLL32Q9gT6Tb789tGc6jrB4AeIRjIXM=; b=pXeILkAlwTg0z81EHiZbOfSY0nGxDqIPlf0vP9hDi406yPwt9hnm/JS0zSJatzXyAI ctdDF/aHWkaPVsTEJM412mQrUHfZ47yLxzHfJAokmQaHIgapKCkvtRMIlwMhAh3RoDMQ u8YKgymQtaokLAyA3A2WGKsQDdYl2CNyxCeyAvyTM9n2jefOg0aDGR29r/PwYJi8CNXj eord5xxGhgey0+xaDU2CNRatGNltnJ/j6elHpBTM+NdvOWVVSZPd/08zWocTUdK9VMBp Vf6tySncING9Z9Gm4XiikPFVY5hVAqtRvjD915deZWT8Ud948oIiRkqltx7Tj9xw5muY BYFA== 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 d39-v6si14340355pla.158.2018.11.15.11.51.01; Thu, 15 Nov 2018 11:51:16 -0800 (PST) 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 S2388916AbeKPF7S (ORCPT + 99 others); Fri, 16 Nov 2018 00:59:18 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:40542 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725742AbeKPF7S (ORCPT ); Fri, 16 Nov 2018 00:59:18 -0500 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 C0D3AEBD; Thu, 15 Nov 2018 11:50:06 -0800 (PST) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B9643F5BD; Thu, 15 Nov 2018 11:50:06 -0800 (PST) Date: Thu, 15 Nov 2018 19:50:04 +0000 From: Will Deacon To: Christoph Hellwig Cc: iommu@lists.linux-foundation.org, Robin Murphy , Catalin Marinas , Guo Ren , Laura Abbott , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/9] dma-mapping: move the arm64 ncoherent alloc/free support to common code Message-ID: <20181115195004.GB4535@brain-police> References: <20181105121931.13481-1-hch@lst.de> <20181105121931.13481-5-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181105121931.13481-5-hch@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoph, Minor nit: typo in the subject "ncoherent". On Mon, Nov 05, 2018 at 01:19:26PM +0100, Christoph Hellwig wrote: > The arm64 codebase to implement coherent dma allocation for architectures > with non-coherent DMA is a good start for a generic implementation, given > that is uses the generic remap helpers, provides the atomic pool for > allocations that can't sleep and still is realtively simple and well > tested. Move it to kernel/dma and allow architectures to opt into it > using a config symbol. Architectures just need to provide a new > arch_dma_prep_coherent helper to writeback an invalidate the caches > for any memory that gets remapped for uncached access. > > Signed-off-by: Christoph Hellwig > --- > arch/arm64/Kconfig | 2 +- > arch/arm64/mm/dma-mapping.c | 184 ++------------------------------ > include/linux/dma-mapping.h | 5 + > include/linux/dma-noncoherent.h | 2 + > kernel/dma/Kconfig | 6 ++ > kernel/dma/remap.c | 158 ++++++++++++++++++++++++++- > 6 files changed, 181 insertions(+), 176 deletions(-) I'm currently at LPC, so I've not been able to test this, but I've been through the changes this morning and they look fine to me, so: Reviewed-by: Will Deacon Hopefully we'll get the fallout from the previous changes addressed next week. Cheers, Will