lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251205-winbond-v6-18-rc1-cont-read-v1-0-01bc48631c73@bootlin.com>
Date: Fri, 05 Dec 2025 20:38:51 +0100
From: Miquel Raynal <miquel.raynal@...tlin.com>
To: Mark Brown <broonie@...nel.org>, Richard Weinberger <richard@....at>, 
 Vignesh Raghavendra <vigneshr@...com>, Michael Walle <mwalle@...nel.org>
Cc: Tudor Ambarus <tudor.ambarus@...aro.org>, 
 Pratyush Yadav <pratyush@...nel.org>, 
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
 Steam Lin <STLin2@...bond.com>, Santhosh Kumar K <s-k6@...com>, 
 linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org, 
 linux-mtd@...ts.infradead.org, Miquel Raynal <miquel.raynal@...tlin.com>
Subject: [PATCH RFC 0/8] mtd: spinand: Winbond continuous read support

Hello,

SPI NAND continuous read support has already been added a few releases
ago, but only Macronix chips were benefiting from this support. Winbond
chips also have a continuous read feature, which is slightly more
complex to use in the scope of the Linux kernel, because they these
chips expect a different read from cache operation once in continuous
mode.

In order to be more flexible, this series changes the logic behind
dirmaps. Direct mappings used to be very static, not flexible. I am
proposing to change this and turn them in to slightly more dynamic
interfaces, where for instance we can:
- Enable/disable the correction (was previously handled by creating yet
  another pair of direct mappings per target).
- Select one or another variant for the cache operations.

I propose to name the variants available in a direct mapping "primary"
and "secondary", and let the upper layer (SPI NOR or SPI NAND) point to
the one that needs to be used for the operation. Controller drivers
should not really care about this change, expect the fact that they
should not keep a static representation of the template on their
side. Because of that, I am creating a capability boolean to flag
drivers that support this capability (the flag is ignored in the
nodirmap case).

This series is sent as an RFC because it changes the way direct mappings
work, even though in practice I expect no regressions™. I am interested
to get an "early" feedback on it. I have also not yet experimentally
tested all combinations yet (last patch is only compile tested), and
because this will take a lot of time, I would like to validate the
approach first.

The series must be applied on top of the SPI NAND Octal DTR series, as I
wanted to include the octal DTR variants in my testing/benchmarks.
Link: https://lore.kernel.org/r/20251031-winbond-v6-17-rc1-oddr-v1-0-be42de23ebf1@bootlin.com

Here is a benchmark with the faster Winbond chip I have, W35N02JW on a
TI AM62a7 LP SK featuring the Cadence QSPI controller, clocked at
25MHz. Speed gain for a 10-page read is about +32% in octal SDR mode,
+47% for a 10-page read in octal DTR mode and up to +83% for a entire
block read!

    1S-8S-8S, no continuous read:

       64 page read speed is 15058 KiB/s

    1S-8S-8S, with continuous reads:

       1 page read speed is 15058 KiB/s
       2 page read speed is 15058 KiB/s
       3 page read speed is 16800 KiB/s
       4 page read speed is 17066 KiB/s
       5 page read speed is 18461 KiB/s
       6 page read speed is 18461 KiB/s
       7 page read speed is 19384 KiB/s
       8 page read speed is 19692 KiB/s
       9 page read speed is 19384 KiB/s
       10 page read speed is 20000 KiB/s
       11 page read speed is 20000 KiB/s
       12 page read speed is 20000 KiB/s
       13 page read speed is 20800 KiB/s
       14 page read speed is 20363 KiB/s
       15 page read speed is 20000 KiB/s
       16 page read speed is 19692 KiB/s
       32 page read speed is 19692 KiB/s
       64 page read speed is 19692 KiB/s

    8D-8D-8D, no continuous read:

       64 page read speed is 23272 KiB/s

    8D-8D-8D, with continuous read:

       1 page read speed is 23272 KiB/s
       2 page read speed is 23272 KiB/s
       3 page read speed is 28000 KiB/s
       4 page read speed is 32000 KiB/s
       5 page read speed is 34285 KiB/s
       6 page read speed is 34285 KiB/s
       7 page read speed is 36000 KiB/s
       8 page read speed is 36571 KiB/s
       9 page read speed is 36000 KiB/s
       10 page read speed is 34285 KiB/s
       11 page read speed is 36666 KiB/s
       12 page read speed is 40000 KiB/s
       13 page read speed is 41600 KiB/s
       14 page read speed is 37333 KiB/s
       15 page read speed is 40000 KiB/s
       16 page read speed is 36571 KiB/s
       32 page read speed is 42666 KiB/s
       64 page read speed is 42666 KiB/s

Thanks!
Miquèl

---
Miquel Raynal (8):
      mtd: spinand: Drop a too strong limitation
      mtd: spinand: Expose spinand_op_is_odtr()
      mtd: spinand: Drop ECC dirmaps
      spi: spi-mem: Transform the read operation template
      spi: spi-mem: Create a secondary read operation
      mtd: spinand: Use secondary ops for continuous reads
      mtd: spinand: winbond: Add support for continuous reads on W35NxxJW
      mtd: spinand: winbond: Add support for continuous reads on W25NxxJW

 drivers/mtd/nand/spi/core.c    | 125 ++++++++++++++---------
 drivers/mtd/nand/spi/winbond.c | 227 ++++++++++++++++++++++++++++++++++++-----
 drivers/mtd/spi-nor/core.c     |  20 ++--
 drivers/spi/spi-mem.c          |  32 ++++--
 include/linux/mtd/spinand.h    |  16 ++-
 include/linux/spi/spi-mem.h    |   8 +-
 6 files changed, 336 insertions(+), 92 deletions(-)
---
base-commit: dbb1c07d7654e3609ca892fcebafde7f33d67c38
change-id: 20251204-winbond-v6-18-rc1-cont-read-664791ddb263

Best regards,
-- 
Miquel Raynal <miquel.raynal@...tlin.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ