From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-mtd@lists.infradead.org
Cc: kernel@pengutronix.de, Richard Weinberger <richard@nod.at>,
Sascha Hauer <s.hauer@pengutronix.de>,
Vinod Koul <vkoul@kernel.org>, NXP Linux Team <linux-imx@nxp.com>,
Fabio Estevam <festevam@gmail.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Han Xu <han.xu@nxp.com>, Shawn Guo <shawnguo@kernel.org>
Subject: [PATCH v4 00/14] Implement exec_op for GPMI nand driver
Date: Tue, 21 May 2019 09:06:29 +0200 [thread overview]
Message-ID: <20190521070643.6244-1-s.hauer@pengutronix.de> (raw)
When rebasing on v5.2-rc1 I observe this backtrace:
[ 10.789761] WARNING: CPU: 0 PID: 1 at /ptx/work/WORK_OOGHO/sha/backup/linux/linux/drivers/mtd/nand/raw/internals.h:
114 nand_reset_op+0x194/0x1c4
[ 10.803137] Modules linked in:
[ 10.806441] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc1-00014-g793f23e5adb0-dirty #676
[ 10.815297] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 10.822054] [<c0112928>] (unwind_backtrace) from [<c010d140>] (show_stack+0x10/0x14)
[ 10.830054] [<c010d140>] (show_stack) from [<c0bd65cc>] (dump_stack+0xd8/0x110)
[ 10.837609] [<c0bd65cc>] (dump_stack) from [<c0127148>] (__warn+0xe0/0x10c)
[ 10.844791] [<c0127148>] (__warn) from [<c0127288>] (warn_slowpath_null+0x3c/0x48)
[ 10.852604] [<c0127288>] (warn_slowpath_null) from [<c070be50>] (nand_reset_op+0x194/0x1c4)
[ 10.861207] [<c070be50>] (nand_reset_op) from [<c070db44>] (nand_reset+0x58/0xb4)
[ 10.868924] [<c070db44>] (nand_reset) from [<c070f454>] (nand_scan_with_ids+0x152c/0x1624)
[ 10.877444] [<c070f454>] (nand_scan_with_ids) from [<c071a8a8>] (gpmi_nand_probe+0x2f8/0x6ac)
[ 10.886235] [<c071a8a8>] (gpmi_nand_probe) from [<c067c2cc>] (platform_drv_probe+0x48/0x98)
[ 10.894844] [<c067c2cc>] (platform_drv_probe) from [<c067a15c>] (really_probe+0xec/0x2c8)
[ 10.903272] [<c067a15c>] (really_probe) from [<c067a494>] (driver_probe_device+0x5c/0x168)
[ 10.911781] [<c067a494>] (driver_probe_device) from [<c067a748>] (device_driver_attach+0x58/0x60)
[ 10.920909] [<c067a748>] (device_driver_attach) from [<c067a7d4>] (__driver_attach+0x84/0xc0)
[ 10.929684] [<c067a7d4>] (__driver_attach) from [<c06785dc>] (bus_for_each_dev+0x70/0xb4)
[ 10.938107] [<c06785dc>] (bus_for_each_dev) from [<c06795fc>] (bus_add_driver+0x154/0x1e0)
[ 10.946615] [<c06795fc>] (bus_add_driver) from [<c067b430>] (driver_register+0x74/0x108)
[ 10.954952] [<c067b430>] (driver_register) from [<c010317c>] (do_one_initcall+0x80/0x330)
[ 10.963385] [<c010317c>] (do_one_initcall) from [<c11011a0>] (kernel_init_freeable+0x2e8/0x3cc)
[ 10.972346] [<c11011a0>] (kernel_init_freeable) from [<c0bf0c60>] (kernel_init+0x8/0x114)
[ 10.980768] [<c0bf0c60>] (kernel_init) from [<c01010b4>] (ret_from_fork+0x14/0x20)
I also reported this as an answer to the original patch introducing
this backtrace here:
http://lists.infradead.org/pipermail/linux-mtd/2019-May/089600.html
No idea what goes wrong here, but in the hope that it's not the fault of this
series I'm resending this rebased version anyway.
The GPMI nand driver suffers from very poor performance. The read
performance can be roughly doubled with two steps: First is to use
runtime PM for controlling the clocks which prevents the driver from
spending a good amount of time en/disabling the clocks. The second step
is to implement exec_op which allows us to combine the steps necessary
to do a page read into a single DMA transaction.
changes since v3:
- Rebase on v5.2-rc1
changes since v2:
- s/dma/dmaengine in dmaengine specific patches
- s/nand/NAND/
- Add reviewed-by Miquel
- Add Acked-by Vinod
changes since v1:
- tested and fixed on i.MX28
- remove debugging leftover
- Add mxs dma specific header files to put the oddities of the mxs dma
driver in
- Turn off BCH engine interrupts when not needed as they result in
calling complete() on an uninitialized completion. This crashes
on i.MX28
Sascha Hauer (14):
mtd: rawnand: export NAND operation tracer
mtd: rawnand: fsmc: Use nand_op_trace for operation tracing
mtd: rawnand: gpmi: move all driver code into single file
mtd: rawnand: gpmi: remove unused variable
mtd: rawnand: gpmi: Remove unnecessary variables
mtd: rawnand: gpmi: read buf in nand_read_page_op
mtd: rawnand: gpmi: remove unused parameters
mtd: rawnand: gpmi: Drop unnecessary restoring of previous
chipselection
mtd: rawnand: gpmi: use runtime PM to manage clocks
dmaengine: mxs: Drop unnecessary flag
mtd: rawnand: gpmi: drop unnecessary flag
dmaengine: mxs: Add header file to be shared with gpmi nand driver
dmaengine: mxs: rename custom flag
mtd: rawnand: gpmi: Implement exec_op
drivers/dma/mxs-dma.c | 25 +-
drivers/mtd/nand/raw/fsmc_nand.c | 19 +-
drivers/mtd/nand/raw/gpmi-nand/Makefile | 1 -
drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c | 923 -----------
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 1685 ++++++++++++++------
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h | 64 +-
drivers/mtd/nand/raw/nand_base.c | 30 +-
include/linux/dma/mxs-dma.h | 24 +
include/linux/mtd/rawnand.h | 36 +
9 files changed, 1261 insertions(+), 1546 deletions(-)
create mode 100644 include/linux/dma/mxs-dma.h
--
2.20.1
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2019-05-21 7:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 7:06 Sascha Hauer [this message]
2019-05-21 7:06 ` [PATCH 01/14] mtd: rawnand: export NAND operation tracer Sascha Hauer
2019-06-03 8:04 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 02/14] mtd: rawnand: fsmc: Use nand_op_trace for operation tracing Sascha Hauer
2019-06-03 8:04 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 03/14] mtd: rawnand: gpmi: move all driver code into single file Sascha Hauer
2019-05-21 8:34 ` Sascha Hauer
2019-05-21 8:40 ` Miquel Raynal
2019-06-03 8:04 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 04/14] mtd: rawnand: gpmi: remove unused variable Sascha Hauer
2019-06-03 8:04 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 05/14] mtd: rawnand: gpmi: Remove unnecessary variables Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 06/14] mtd: rawnand: gpmi: read buf in nand_read_page_op Sascha Hauer
2019-05-21 7:06 ` [PATCH 07/14] mtd: rawnand: gpmi: remove unused parameters Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 08/14] mtd: rawnand: gpmi: Drop unnecessary restoring of previous chipselection Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 09/14] mtd: rawnand: gpmi: use runtime PM to manage clocks Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 10/14] dmaengine: mxs: Drop unnecessary flag Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 11/14] mtd: rawnand: gpmi: drop " Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 12/14] dmaengine: mxs: Add header file to be shared with gpmi nand driver Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 13/14] dmaengine: mxs: rename custom flag Sascha Hauer
2019-06-03 8:03 ` Miquel Raynal
2019-05-21 7:06 ` [PATCH 14/14] mtd: rawnand: gpmi: Implement exec_op Sascha Hauer
2019-06-03 8:02 ` Miquel Raynal
2019-05-21 8:19 ` [PATCH v4 00/14] Implement exec_op for GPMI nand driver Sascha Hauer
2019-05-21 8:33 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190521070643.6244-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=festevam@gmail.com \
--cc=han.xu@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).