From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [RFC PATCH] RFC: Sketch of dm event notification
Date: Wed, 17 Nov 2021 12:03:34 +0900 [thread overview]
Message-ID: <20211117030334.GD36373@laputa> (raw)
In-Reply-To: <CAPnjgZ2=GF5ge+f8qhahEs_C1VmF9=O403mRd+cNbWvKm4+VZg@mail.gmail.com>
On Tue, Nov 16, 2021 at 07:48:59PM -0700, Simon Glass wrote:
> Hi Takahiro,
>
> On Tue, 16 Nov 2021 at 19:31, AKASHI Takahiro
> <takahiro.akashi@linaro.org> wrote:
> >
> > Simon,
> >
> > On Mon, Nov 01, 2021 at 03:41:50PM +0900, AKASHI Takahiro wrote:
> > > Hello Simon,
> > >
> > > On Sun, Oct 31, 2021 at 09:07:01PM -0600, Simon Glass wrote:
> > > > This is a patch for Takahiro to look at, just for illustration. Not ready
> > > > for review.
> > >
> > > Thank you for posting the draft.
> > > At a first glance, it looks good and I don't see any specific issue
> > > with your implementation.
> >
> > I said OK and functionally it should work well, but I now have
> > some concerns:
> > 1) In my current implementation, I use post_probe/pre_remove hooks
> > of BLK device to invoke efi callback functions. In this sense,
> > event(POST_PROBE/ PRE_REMOVE) seems to be a duplicated feature
> > in some way.
>
> We should not be calling EFI functions from a BLK devince, unless it
> is an EFI block device, i.e. we should provide hooks for EFI or any
> other interested party to use.
Even for now, part_init() is called in post_probe() (and
blk_create_partitions(), which is to create another type of
uclass device, in my patch as well).
So I'm not sure what functions can and should be called
and what not in those hooks.
Do you want to convert part_init() to an event subscriber
along with my efi hooks?
-Takahiro Akashi
> > 2) For the rest of uclass devices which don't utilise events yet,
> > device_notify() is nothing but an overhead as it always tries to
> > go through a list of event hooks.
>
> Yes that's true, but it can be optimised to avoid useless
> searches/calls, since subscribers need to specify an even they are
> interested in.
>
> >
> > Event notification can be more than just a dm feature, but ...
> > What's your thought here?
>
> Yes, more than just a DM feature. For example I think it could help
> with the initcalls we have in board_f and board_r.
>
> Regards,
> Simon
>
> >
> > -Takahiro Akashi
> >
> > > Since my code has already added DM_TAG support, I'm looking forward for
> > > getting your final patch.
> > >
> > > The only remaining issue is *modeling* partitions :)
> > >
> > > -Takahiro Akashi
> > >
> > > > To run the test:
> > > >
> > > > ./u-boot -T -c "ut common test_event_probe"
> > > >
> > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > ---
>
> [..]
>
> Regards,
> Simon
next prev parent reply other threads:[~2021-11-17 3:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 3:07 [RFC PATCH] RFC: Sketch of dm event notification Simon Glass
2021-11-01 6:41 ` AKASHI Takahiro
2021-11-17 2:31 ` AKASHI Takahiro
2021-11-17 2:48 ` Simon Glass
2021-11-17 3:03 ` AKASHI Takahiro [this message]
2021-11-25 0:12 ` Simon Glass
2021-11-25 2:57 ` AKASHI Takahiro
2021-12-07 15:07 ` Simon Glass
2021-12-29 13:36 ` Simon Glass
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=20211117030334.GD36373@laputa \
--to=takahiro.akashi@linaro.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/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