From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>,
Zhouyang Jia <jiazhouyang09@gmail.com>,
linux-mtd@lists.infradead.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v10 10/10] mtd: maps: gpio-addr-flash: Add support for device-tree devices
Date: Fri, 5 Oct 2018 18:29:31 +0200 [thread overview]
Message-ID: <20181005182931.172b8f1c@bbrezillon> (raw)
In-Reply-To: <CAPybu_1cd9aJN9mC9m36Gd_fhU5UnfLH9EtU0h8BvJCZchOV_A@mail.gmail.com>
On Fri, 5 Oct 2018 17:40:44 +0200
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> Hi Boris
> On Fri, Oct 5, 2018 at 4:52 PM Boris Brezillon
> <boris.brezillon@bootlin.com> wrote:
> >
> > On Fri, 5 Oct 2018 16:06:57 +0200
> > Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> >
> > > Hi again Boris
> > >
> > >
> > > On Fri, Oct 5, 2018 at 2:10 PM Boris Brezillon
> > > <boris.brezillon@bootlin.com> wrote:
> > > >
> > > > On Fri, 5 Oct 2018 14:04:52 +0200
> > > > Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> > > >
> > > > > Hi Boris
> > > > > On Fri, Oct 5, 2018 at 12:12 PM Boris Brezillon
> > > > > <boris.brezillon@bootlin.com> wrote:
> > > > > >
> > > > > > On Fri, 5 Oct 2018 11:54:18 +0200
> > > > > > Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> > > > > >
> > > > > > > Hi Boris
> > > > > > >
> > > > > > > Just seen that you already did the rebase at
> > > > > > > https://github.com/bbrezillon/linux-0day/commits/mtd/physmap-cleanup
> > > > > > >
> > > > > > > Thanks for that.
> > > > > > >
> > > > > > > I am about to test it in real hw (unless you want me wait)
> > > > > >
> > > > > > Sure, go ahead and test it.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Boris
> > > > > I had to change this on your patchset to have it working on hw:
> > > > > https://pastebin.com/78A7yhJ9
> > > > >
> > > > > If you send the patchset to the mailing list I can review it patch by patch.
> > > > >
> > > > > Also
> > > > > mtd: maps: Prepare merging of physmap and physmap_of
> > > > >
> > > > > I do not think that can be bisected. (Not sure, I have to test it)
> > > >
> > > > Okay, I'll have a look.
> > > >
> > > > >
> > > > > I add the diff to the mail, but gmail will probably scramble the
> > > > > lines(yes I know I have to use other mail client)
> > > >
> > > > The diff looks good, I'll fix that an send a push a new version.
> > >
> > > Also fix on physmap_flash_remove
> > >
> > > physmap_data->exit(dev); must be called BEFORE
> > > map_destroy(info->mtds[i]);
> >
> > Hm, that's weird. That shouldn't happen. Do you have a non-NULL
> > ->exit()? Can you detail why you think ->exit() call is the cause of
> > this OOPS?
> >
>
> No idea. It was crashing at:
> https://github.com/bbrezillon/linux-0day/blob/mtd/physmap-cleanup/drivers/mtd/chips/cfi_cmdset_0002.c#L2839
> cfi_cmdset_0002.c seesm to play with cfi->chips on its reset callback
>
> I added some printfs:
>
> if (!cfi),
> if (!chip)
> if (!cfi->chips)
>
> sometimes it crashed on one place, sometimes in another :S. Reading
> back our patch it seemed more logical (semantically :P) to
> destroy after exit and not the other way around.
Actually no, it makes more sense to call ->exit() after destroying the
maps, because the platform-specific ->exit() implem might release
resources that are used during the destroy_map() operation. Another
reason to keep it in this order is that operations in the remove path
should be in the reverse order of those done in the probe path, and
->init() is definitely called before map_probe().
>
> I made that change and it stopped OOPsing at reboot.
Maybe it's just a side effect, especially since I'm pretty sure your
physmap_data->exit() is NULL (assuming you do use DT to declare your
flash).
>
> Havent had the time to dig deeper. But if it does not break anything
> on your side to invert destroy and exit please do so. It was not
> oopsing with my patchset.
I'd like to understand what's happening before doing this change. As I
said, I fear this reordering just hides something else.
next prev parent reply other threads:[~2018-10-05 16:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 14:29 [PATCH v10 09/10] dt-binding: mtd: Document gpio-addr-flash Ricardo Ribalda Delgado
2018-10-04 14:29 ` [PATCH v10 10/10] mtd: maps: gpio-addr-flash: Add support for device-tree devices Ricardo Ribalda Delgado
2018-10-04 22:21 ` Boris Brezillon
2018-10-05 6:31 ` Ricardo Ribalda Delgado
2018-10-05 7:08 ` Boris Brezillon
2018-10-05 8:10 ` Ricardo Ribalda Delgado
2018-10-05 8:37 ` Boris Brezillon
2018-10-05 9:54 ` Ricardo Ribalda Delgado
2018-10-05 10:12 ` Boris Brezillon
2018-10-05 12:04 ` Ricardo Ribalda Delgado
2018-10-05 12:10 ` Boris Brezillon
2018-10-05 14:06 ` Ricardo Ribalda Delgado
2018-10-05 14:52 ` Boris Brezillon
2018-10-05 15:40 ` Ricardo Ribalda Delgado
2018-10-05 16:29 ` Boris Brezillon [this message]
2018-10-05 18:12 ` Ricardo Ribalda Delgado
2018-10-05 19:32 ` Boris Brezillon
2018-10-08 7:40 ` Ricardo Ribalda Delgado
2018-10-08 12:23 ` Boris Brezillon
2018-10-05 14:46 ` Boris Brezillon
2018-10-05 15:35 ` Ricardo Ribalda Delgado
2018-10-05 15:23 ` Boris Brezillon
2018-10-05 15:42 ` Ricardo Ribalda Delgado
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=20181005182931.172b8f1c@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jiazhouyang09@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=ricardo.ribalda@gmail.com \
--cc=richard@nod.at \
/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.