Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3866557pxb; Tue, 10 Nov 2020 02:00:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeJ5e7CHnmPp3xwTDV5JLIk2UPhcHySQcefVK+3MmZDnAzhEL/3z4iF/b5k4UJxJnVrc6U X-Received: by 2002:a17:906:9414:: with SMTP id q20mr18936545ejx.384.1605002443435; Tue, 10 Nov 2020 02:00:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605002443; cv=none; d=google.com; s=arc-20160816; b=1BkIylf0ttB6UKbyQYs2UHTcRDqpttrU8vqBM1UmG6rz2DwtiW+LE/UiZ2/wRp68Bc RQY+QR3ad0LrU1wpnqRnB5jndIgX5Ru+ojibp4WFtJWbeLKqXF6MYB5gSsT/3xzzNm05 H6Lw/is9kQjGa0b7019tQDG2XAF5yZiqGpw3hWLfeBr2OJgMeaqRo9rQtBaSvJau1Qui a9R1WTvcfdD+7aYk0UJZHC50/jqng6ItUXp4SoVJte/I1V0f7wsqbgS6xmUn35HjAwid dz77lCfAdnEGz6fg8Cdro2MvpxnDCaS4WG6JJIED6jA3nkVDgNEYIvOwliUuUisapDKZ EH/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=/HVO3LinQW3/KbzX89F944/PyaQEQE6y/T0ShCe6YHo=; b=TMGTLGvlMuUOTOQ1bKQRmSgn4H4bcYFbj7kDIyG1Bo3vCIVHbhuaKJBF36msPX1n6l /tCLdDD5ftg2AhPGB0AmUQXcW4mW1FM4IqhI1OB9EE4AvMn7uCfLtSS76e64moL73u21 +OGKUOhTpRI3D2/eOTjtgUDWQF9v47s3Q32pEdpqttGvqzBJPZHyXtDk3HgDFYytXRy7 salV3xfx7nmxIbf+UN5J6rZ/CE7SzNr4mTXv9n8qmOexZkcLMLIHwcMdclBKCRh2JMiI HKBhn5hIexaKM1x+hv6aCzdUyCfM74Xyfal36N43TJZfbkjaEGq1ezyboV6qdNf7LDzP ih2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si8814662ejk.683.2020.11.10.02.00.19; Tue, 10 Nov 2020 02:00:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729386AbgKJJ5v (ORCPT + 99 others); Tue, 10 Nov 2020 04:57:51 -0500 Received: from verein.lst.de ([213.95.11.211]:35378 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbgKJJ5v (ORCPT ); Tue, 10 Nov 2020 04:57:51 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 923756736F; Tue, 10 Nov 2020 10:57:47 +0100 (CET) Date: Tue, 10 Nov 2020 10:57:47 +0100 From: Christoph Hellwig To: Tomasz Figa Cc: Ricardo Ribalda , Christoph Hellwig , Kieran Bingham , Laurent Pinchart , Mauro Carvalho Chehab , Marek Szyprowski , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Robin Murphy , Linux Doc Mailing List , Linux Kernel Mailing List , Linux Media Mailing List Subject: Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API Message-ID: <20201110095747.GA26574@lst.de> References: <20200930160917.1234225-1-hch@lst.de> <20200930160917.1234225-9-hch@lst.de> <20201110092506.GA24469@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 10, 2020 at 06:50:32PM +0900, Tomasz Figa wrote: > In what terms it doesn't actually work? Last time I checked some > platforms actually defined CONFIG_DMA_NONCOHERENT, so those would > instead use the kmalloc() + dma_map() path. I don't have any > background on why that was added and whether it needs to be preserved, > though. Kieran, Laurent, do you have any insight? CONFIG_DMA_NONCOHERENT is set on sh and mips for platforms that may support non-coherent DMA at compile time (but at least for mips that doesn't actually means this gets used). Using that ifdef to decide on using usb_alloc_coherent vs letting the usb layer map the data seems at best odd, and if we are unlucky papering over a bug somewhere.