From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 075761F76CB for ; Fri, 17 Jan 2025 07:52:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737100372; cv=none; b=GFSz//U+hwbyodLk3WcSpwFL2JDQF9z8CA8EPjjI1XmO97hh0ajMlpJVSxpQyNUeIvdrssYN1h9ZMMOOdOdliP+e7wOLfDCA0eahxFnE1S6l3ll/tEaMKTvfXw2d31+KN6mPLUMHWV/bglH5rU012CksM/TwYq1Usq0+ZIf6KU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737100372; c=relaxed/simple; bh=pi/OVxrxMMAaKAIBGJmNDf9r007pw5N+z1GF3kY1ECA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gTNEmAtRADxGmVQ/iajFPx+57xfRM5tdVBiZb7RgYMnAymaaaVegzQiQba7dKzvzclXvdBpiIi+MZzMpOsaYgrF9jWatJOTHwtGQL0WiUmMrvEfzh5myLzFWpJHR3yVPtuUBE/HEu/yXU9bZLtIPwTihgXY7dmIXAiLi8yIEaC8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 3B12A68BFE; Fri, 17 Jan 2025 08:52:38 +0100 (CET) Date: Fri, 17 Jan 2025 08:52:38 +0100 From: Christoph Hellwig To: Sergey Matyukevich Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Alexandre Ghiti , Conor Dooley , Robin Murphy , Lad Prabhakar , Geert Uytterhoeven , Christoph Hellwig Subject: Re: [PATCH] riscv: select DMA_DIRECT_REMAP by RISCV_ISA_SVPBMT and ERRATA_THEAD_MAE Message-ID: <20250117075238.GA25422@lst.de> References: <20250116172950.1989748-1-geomatsi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250116172950.1989748-1-geomatsi@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Jan 16, 2025 at 08:29:35PM +0300, Sergey Matyukevich wrote: > Select DMA_DIRECT_REMAP for the RISC-V extensions that allow to set > page-based memory types in PTEs according to the requested DMA > attributes. This is the purpose of Svpbmt or XTheadMae extensions. > Zicbom or XTheadCmo serve a different purpose, providing instructions > to flush/invalidate cache blocks. Please explain what this is supposed to solve, because the above explanation dosn't make any sense. DMA_DIRECT_REMAP is one of the implementations supporting dma coherent allocatiosn for non-coherent devices. So selecting it from something that just keyes off support for an extension, but not the dma implementation is wrong.