From: Boris Brezillon <boris.brezillon@collabora.com>
To: Sean Nyekjaer <sean@geanix.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Boris Brezillon <bbrezillon@kernel.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/4] mtd: core: protect access to mtd devices while in suspend
Date: Mon, 1 Nov 2021 08:46:52 +0100 [thread overview]
Message-ID: <20211101084652.0fe6272f@collabora.com> (raw)
In-Reply-To: <20211026055551.3053598-1-sean@geanix.com>
On Tue, 26 Oct 2021 07:55:47 +0200
Sean Nyekjaer <sean@geanix.com> wrote:
> Follow-up on discussion in:
> https://lkml.org/lkml/2021/10/4/41
> https://lkml.org/lkml/2021/10/11/435
>
> Changes since v3:
> - edited commit msg and author for mtdconcat patch
>
> Changes since v2:
> - added signoff's to patch from Boris
> - removed accidential line break
> - kept tests consistent: master->master.suspended == 0 -> !master->master.suspended
> - added comments to mtdconcat patch
> - moved mtdconcat before ('mtd: core: protect access to MTD devices while in suspend')
>
> Changes since v1:
> - removed __mtd_suspend/__mtd_resume functions as they are not used by
> mtdconcat anymore.
> - only master mtd_info is used for mtd_{start,end}_access(). Warn if we
> got mtd's.
> - added Boris patch for using uninitialized _suspend/_resume hooks when
> bbt scanning
> - mtdconcat uses device _suspend/_resume hooks
> - I don't really like the macro proposal from Boris
> mtd_no_suspend_void_call()/mtd_no_suspend_ret_call() I think they
> make the code complex to read and the macro's doesn't fit every
> where anyway...
>
> Changes since from rfc v1/v2:
> - added access protection for all device access hooks in mtd_info.
> - added Suggested-by to [1/3] patch.
> - removed refereces to commit ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op")
> from commit msg as commit 013e6292aaf5 ("mtd: rawnand: Simplify the locking") is
> to be blamed.
> - tested on a kernel with LOCKDEP enabled.
>
> Boris Brezillon (2):
> mtd: rawnand: nand_bbt: hide suspend/resume hooks while scanning bbt
> mtd: mtdconcat: don't use mtd_{suspend,resume}()
>
> Sean Nyekjaer (2):
> mtd: core: protect access to MTD devices while in suspend
> mtd: rawnand: remove suspended check
Looks good overall (after fixing the minor things I pointed out, of
course), but I'd recommend applying this series to mtd-next just after
-rc1 is out so you get a chance to detect regressions before it's
merged in Linus' tree. I fear this unconditional blocking on suspended
device will lead to unexpected deadlocks (see my comment on panic
writes)...
>
> drivers/mtd/mtdconcat.c | 15 +++-
> drivers/mtd/mtdcore.c | 124 +++++++++++++++++++++++++++----
> drivers/mtd/nand/raw/nand_base.c | 52 ++++---------
> drivers/mtd/nand/raw/nand_bbt.c | 28 ++++++-
> include/linux/mtd/mtd.h | 81 ++++++++++++++++----
> include/linux/mtd/rawnand.h | 5 +-
> 6 files changed, 230 insertions(+), 75 deletions(-)
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Sean Nyekjaer <sean@geanix.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Boris Brezillon <bbrezillon@kernel.org>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/4] mtd: core: protect access to mtd devices while in suspend
Date: Mon, 1 Nov 2021 08:46:52 +0100 [thread overview]
Message-ID: <20211101084652.0fe6272f@collabora.com> (raw)
In-Reply-To: <20211026055551.3053598-1-sean@geanix.com>
On Tue, 26 Oct 2021 07:55:47 +0200
Sean Nyekjaer <sean@geanix.com> wrote:
> Follow-up on discussion in:
> https://lkml.org/lkml/2021/10/4/41
> https://lkml.org/lkml/2021/10/11/435
>
> Changes since v3:
> - edited commit msg and author for mtdconcat patch
>
> Changes since v2:
> - added signoff's to patch from Boris
> - removed accidential line break
> - kept tests consistent: master->master.suspended == 0 -> !master->master.suspended
> - added comments to mtdconcat patch
> - moved mtdconcat before ('mtd: core: protect access to MTD devices while in suspend')
>
> Changes since v1:
> - removed __mtd_suspend/__mtd_resume functions as they are not used by
> mtdconcat anymore.
> - only master mtd_info is used for mtd_{start,end}_access(). Warn if we
> got mtd's.
> - added Boris patch for using uninitialized _suspend/_resume hooks when
> bbt scanning
> - mtdconcat uses device _suspend/_resume hooks
> - I don't really like the macro proposal from Boris
> mtd_no_suspend_void_call()/mtd_no_suspend_ret_call() I think they
> make the code complex to read and the macro's doesn't fit every
> where anyway...
>
> Changes since from rfc v1/v2:
> - added access protection for all device access hooks in mtd_info.
> - added Suggested-by to [1/3] patch.
> - removed refereces to commit ef347c0cfd61 ("mtd: rawnand: gpmi: Implement exec_op")
> from commit msg as commit 013e6292aaf5 ("mtd: rawnand: Simplify the locking") is
> to be blamed.
> - tested on a kernel with LOCKDEP enabled.
>
> Boris Brezillon (2):
> mtd: rawnand: nand_bbt: hide suspend/resume hooks while scanning bbt
> mtd: mtdconcat: don't use mtd_{suspend,resume}()
>
> Sean Nyekjaer (2):
> mtd: core: protect access to MTD devices while in suspend
> mtd: rawnand: remove suspended check
Looks good overall (after fixing the minor things I pointed out, of
course), but I'd recommend applying this series to mtd-next just after
-rc1 is out so you get a chance to detect regressions before it's
merged in Linus' tree. I fear this unconditional blocking on suspended
device will lead to unexpected deadlocks (see my comment on panic
writes)...
>
> drivers/mtd/mtdconcat.c | 15 +++-
> drivers/mtd/mtdcore.c | 124 +++++++++++++++++++++++++++----
> drivers/mtd/nand/raw/nand_base.c | 52 ++++---------
> drivers/mtd/nand/raw/nand_bbt.c | 28 ++++++-
> include/linux/mtd/mtd.h | 81 ++++++++++++++++----
> include/linux/mtd/rawnand.h | 5 +-
> 6 files changed, 230 insertions(+), 75 deletions(-)
>
next prev parent reply other threads:[~2021-11-01 7:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 5:55 [PATCH v4 0/4] mtd: core: protect access to mtd devices while in suspend Sean Nyekjaer
2021-10-26 5:55 ` Sean Nyekjaer
2021-10-26 5:55 ` [PATCH v4 1/4] mtd: rawnand: nand_bbt: hide suspend/resume hooks while scanning bbt Sean Nyekjaer
2021-10-26 5:55 ` Sean Nyekjaer
2021-11-01 7:38 ` Boris Brezillon
2021-11-01 7:38 ` Boris Brezillon
2021-11-01 8:46 ` Sean Nyekjaer
2021-11-01 8:46 ` Sean Nyekjaer
2021-11-02 8:43 ` Boris Brezillon
2021-11-02 8:43 ` Boris Brezillon
2021-10-26 5:55 ` [PATCH v4 2/4] mtd: mtdconcat: don't use mtd_{suspend,resume}() Sean Nyekjaer
2021-10-26 5:55 ` Sean Nyekjaer
2021-10-26 5:55 ` [PATCH v4 3/4] mtd: core: protect access to MTD devices while in suspend Sean Nyekjaer
2021-10-26 5:55 ` Sean Nyekjaer
2021-11-01 7:40 ` Boris Brezillon
2021-11-01 7:40 ` Boris Brezillon
2021-10-26 5:55 ` [PATCH v4 4/4] mtd: rawnand: remove suspended check Sean Nyekjaer
2021-10-26 5:55 ` Sean Nyekjaer
2021-11-01 7:46 ` Boris Brezillon [this message]
2021-11-01 7:46 ` [PATCH v4 0/4] mtd: core: protect access to mtd devices while in suspend Boris Brezillon
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=20211101084652.0fe6272f@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=bbrezillon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=sean@geanix.com \
--cc=vigneshr@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.