Received: by 10.213.65.68 with SMTP id h4csp1661784imn; Mon, 19 Mar 2018 09:57:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELsdvATtkDl9y5D+AT04/4ysrnlYguf7LuX/NeSlzPNhzaMzIop/wF+6ThORrrcKkl45Zods X-Received: by 2002:a17:902:bf03:: with SMTP id bi3-v6mr13115072plb.343.1521478666063; Mon, 19 Mar 2018 09:57:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521478666; cv=none; d=google.com; s=arc-20160816; b=ynsVfSprcfMkd0DxWpUaCQ4221raZy4HY6pBga3fYJmIfOLlFG1ti+vU6dWe+9Dw6E DwB04NPpgXnd3c9WIAMTG4aWSuhHd2jgZfTVDRscqi7QK2l6DgTJwur1p+qXAl1uJXCu DIULlZJ5Lusl9iKg56YZVyjZP02TPiBQznW/SploIj7FyKlxSoVf3Ge5Im6aO3rLF1Qu BVSk78shWwhBVkqykds9wKHLmIYD/jN39as7vJ/yGXr456bsD2PYSkiLhi3Iff85fJmv uZ8/nHmQJSMDurt7yPHIWS/mftQ3mnN1xCdx7Wh4xvdPBArRfhSJCXtLITTthpJYnzdw s7FQ== 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:arc-authentication-results; bh=QrIaFYWp/rjPIhDO9z+YDvZs6yBZc8s9pLA4bEegv48=; b=LvcAd4ccp2Vu40zvpFu5BJ0EX+sPfAaVWvtiEzBRyYJ/9UTtzEXazomLoCsnNWrsjn Wpw6pngrZPHJxj6Hd+kCP+iSeibPv60JcSjPsrnvVehwgLNavO7AJF7eqFh30GrGPQ/v MCPJku234MpYt6uj3r5Nl79hpvwrpScxoVFC9de2Z5TZX6TvmN7A6PiwlPWMczjY6pyY IL9bCFvlSs2SNF7inhmfsXc7m6bK6ZJdGnNbE98XGOv/XH6WO2+T5+yzEAbKnkWi3pGs NErvzQLDJK+m3VpKQuxnr9X8dr6neE+MxSv2A8+PyWsWvV4kzaU9LUwZrwS0N6hf3vWp MwGA== 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 g8-v6si275984pln.420.2018.03.19.09.57.31; Mon, 19 Mar 2018 09:57:46 -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 S967542AbeCSQzs (ORCPT + 99 others); Mon, 19 Mar 2018 12:55:48 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55352 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935120AbeCSQzo (ORCPT ); Mon, 19 Mar 2018 12:55:44 -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 A1FF880D; Mon, 19 Mar 2018 09:55:43 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 70E563F24A; Mon, 19 Mar 2018 09:55:43 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id AE7E61AE553A; Mon, 19 Mar 2018 16:55:51 +0000 (GMT) Date: Mon, 19 Mar 2018 16:55:51 +0000 From: Will Deacon To: Christoph Hellwig Cc: Robin Murphy , x86@kernel.org, Tom Lendacky , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, Muli Ben-Yehuda , iommu@lists.linux-foundation.org, David Woodhouse , Catalin Marinas Subject: Re: [PATCH 12/14] dma-direct: handle the memory encryption bit in common code Message-ID: <20180319165551.GE14916@arm.com> References: <20180319103826.12853-1-hch@lst.de> <20180319103826.12853-13-hch@lst.de> <20180319152442.GA27915@lst.de> <5316b479-7e75-d62f-6b17-b6bece55187c@arm.com> <20180319154832.GD14916@arm.com> <20180319160343.GA29002@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180319160343.GA29002@lst.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 05:03:43PM +0100, Christoph Hellwig wrote: > On Mon, Mar 19, 2018 at 03:48:33PM +0000, Will Deacon wrote: > > Why can't we just resolve the conflict by adding the underscores? > > We can solve the conflict easily that way. But that's not the point. > > The point is that I've been fighting hard to consolidate dma code > given that the behavior really is common and not arch specific. And > this one is another case like that: the fact that the non-coherent > dma boundary is bigger than the exposed size is something that can > easily happen elsewhere, so there is no need to duplicate a lot > of code for that. Fair enough, although I wouldn't say it's a *lot* of code being duplicated. Are there other architectures working around this issue too? I couldn't see anything in the other dma-direct.h headers. > Nevermind that the commit should at least be three different patches: > > (1) revert the broken original commit > (2) increase the dma min alignment > (3) put the swiotlb workaround in place I'd agree with you if this wasn't already queued and sitting in -next. Reverting what we currently have seems a bit OTT now. Catalin? Will