Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30BACC28CF5 for ; Wed, 26 Jan 2022 10:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240323AbiAZKxD (ORCPT ); Wed, 26 Jan 2022 05:53:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240325AbiAZKw6 (ORCPT ); Wed, 26 Jan 2022 05:52:58 -0500 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [IPv6:2001:4b98:dc4:8::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170ACC061748 for ; Wed, 26 Jan 2022 02:52:57 -0800 (PST) Received: (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id CCEEA200010; Wed, 26 Jan 2022 10:52:53 +0000 (UTC) From: Miquel Raynal To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , linux-mtd@lists.infradead.org, Mark Brown , linux-spi@vger.kernel.org Cc: Julien Su , Jaime Liao , Thomas Petazzoni , Boris Brezillon , Xiangsheng Hou Subject: Re: [PATCH v9 08/13] mtd: spinand: Create direct mapping descriptors for ECC operations Date: Wed, 26 Jan 2022 11:52:52 +0100 Message-Id: <20220126105252.882804-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220104083631.40776-9-miquel.raynal@bootlin.com> References: MIME-Version: 1.0 X-linux-mtd-patch-notification: thanks X-linux-mtd-patch-commit: b'b32d4773f7aa60645ec0c7dfa74992e98facb0b7' Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On Tue, 2022-01-04 at 08:36:26 UTC, Miquel Raynal wrote: > In order for pipelined ECC engines to be able to enable/disable the ECC > engine only when needed and avoid races when future parallel-operations > will be supported, we need to provide the information about the use of > the ECC engine in the direct mapping hooks. As direct mapping > configurations are meant to be static, it is best to create two new > mappings: one for regular 'raw' accesses and one for accesses involving > correction. It is up to the driver to use or not the new ECC enable > boolean contained in the spi-mem operation. > > As dirmaps are not free (they consume a few pages of MMIO address space) > and because these extra entries are only meant to be used by pipelined > engines, let's limit their use to this specific type of engine and save > a bit of memory with all the other setups. > > Signed-off-by: Miquel Raynal Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git spi-mem-ecc. Miquel