Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1999595ybm; Thu, 23 May 2019 09:45:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3MQVfGClv1ONvbURqW5yC8Afo5KTJnMe0EUSEF5ShnM0wTotaqfvGa0beTf8CA8a6FQqX X-Received: by 2002:a17:902:bf07:: with SMTP id bi7mr61582923plb.248.1558629959352; Thu, 23 May 2019 09:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558629959; cv=none; d=google.com; s=arc-20160816; b=vYlOnWZAK0SmSnA5hN6mgCghLeY+twEarxr90wYAn3CUpqLpYtYuSKgZAj9wdjldVM 2Ad1tC/ajUzIuM1cEKgkdUDMfYFNCJw/iYqdNv1yTMVTLfg0e/xLPndp8jW8entisNo4 uj8QxGL9vwJEDAe61yLPufNe1Pys7ZaFPhQBhfDCQ9KyKKA2jOV2CFeGlhohKuzNrPdd MJWofBUTJdW04gOgd1nE+i7SlQXVwRwisAm6emkkN+wnA/wxGY4lA6JFDtvrEM7b0Dgr vPh2i5FIHtEWS/uQ/0ZZv/YxbrzhTy3LQdei3xMZNaCmeXQ2UUpjc0vxWFvvjGU6x0J9 dQJw== 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=35nno5nUE1lvhuIhhSxW8BjYDf/l4T22/NHSKnnzf1Q=; b=ydibIRKvuKAYNpZ3CMuf/eVR/BcgRnFmQX/9Bami6SDR8HTFM7czT1nN1Pin8xNKhO F72qaztm8dTK4q6OljAB0fkON9SYkLwp+BRDBVySfRGqGY38wfThB1G/EraybxPsV6/+ IlC1I+V5TSfuRLv/TlUsJh/kyyudCAimr28O4C+3TqBI3wVoYJAZq4oi7axcfOUMgJT4 ltcT09dZqVRFeAgX+YHw3N0GeLXplvQZ9EHU8M7WahPvME4wopSbp9oOiaVZ0ZDyDRxy BeZOouR37G9OPTEOSyu+znnYpowvBdOAwg9K3enC6MTTsUF0qzrdxyBI587/L63exOFR BLCg== 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 q12si31349897pgh.594.2019.05.23.09.45.43; Thu, 23 May 2019 09:45:59 -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 S1731645AbfEWQn5 (ORCPT + 99 others); Thu, 23 May 2019 12:43:57 -0400 Received: from verein.lst.de ([213.95.11.211]:47936 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731156AbfEWQn4 (ORCPT ); Thu, 23 May 2019 12:43:56 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 941CA68AFE; Thu, 23 May 2019 18:43:32 +0200 (CEST) Date: Thu, 23 May 2019 18:43:32 +0200 From: Christoph Hellwig To: Marek Szyprowski Cc: Robin Murphy , Christoph Hellwig , Horia =?utf-8?Q?Geant=C4=83?= , Konrad Rzeszutek Wilk , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: Re: [PATCH] swiotlb: sync buffer when mapping FROM_DEVICE Message-ID: <20190523164332.GA22245@lst.de> References: <20190522072018.10660-1-horia.geanta@nxp.com> <20190522123243.GA26390@lst.de> <6cbe5470-16a6-17e9-337d-6ba18b16b6e8@arm.com> <20190522130921.GA26874@lst.de> <20190522133400.GA27229@lst.de> <0c79721a-11cb-c945-5626-3d43cc299fe6@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c79721a-11cb-c945-5626-3d43cc299fe6@samsung.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 07:35:07AM +0200, Marek Szyprowski wrote: > Don't we have DMA_BIDIRECTIONAL for such case? Not sure if it was intended for that case, but it definitively should do the right thing for swiotlb, and it should also do the right thing in terms of cache maintainance. > Maybe we should update > documentation a bit to point that DMA_FROM_DEVICE expects the whole > buffer to be filled by the device? Probably. Horia, can you try to use DMA_BIDIRECTIONAL?