From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE69BC433EF for ; Wed, 17 Nov 2021 03:03:49 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CC7A608FE for ; Wed, 17 Nov 2021 03:03:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0CC7A608FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B25D882FBD; Wed, 17 Nov 2021 04:03:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="iY7hzepm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4721383072; Wed, 17 Nov 2021 04:03:44 +0100 (CET) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0305682F5F for ; Wed, 17 Nov 2021 04:03:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x430.google.com with SMTP id i12so1263194pfd.6 for ; Tue, 16 Nov 2021 19:03:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=cLj93x0dw0b7veM6iVAGD+kRX9Sxqaljo5ep/hyK92A=; b=iY7hzepmx1yUij9GPI13pdCCct3xgzx/sTxrx9ZAErXQqCsCN9gMz8UvD7wPQ5gRa4 gTlgkHSnM0iiNBxO5TtYIJXHX4IGm1QBYEvhlLqP6lrGLCumYqcUou5qrArjZ5TlY80F kuJLYpRJg2HelZsurbTP02Ip51a+QupZu/fYUepCLPKykecZjls6Aw7sTWBiC50CoDSi clPrzLIVahkeWc0jKUcAB6JIp5/3J2mj5Py30CimsS760XmQJhFIWlGVQd0boFHoJEq/ kQu7+iOPWd3lJTv7slSnrOnXMti84HhF7saXCNgA547uiSstNtzUkhRXLzl98cgODHBQ gZ9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=cLj93x0dw0b7veM6iVAGD+kRX9Sxqaljo5ep/hyK92A=; b=7H1Og3Lx9lOvCm/GWKEVEX8QY2+TkLS2N3/gVUVTL15pGkwDkrf9Wlw9OfLo1FtZ+O ujM2hCN66Pgd/M/iOmEo3t3u0TetnZxiO07BNE6FC2GBxdQ4bWGh5bzYlNR4WBajSRCl k5MKOpZ9dTvsTHSgoC05Ujqx4SgEjhYIzxp2WZ3lTxl3Bod6EsTbSWje9Bz9j+d7Llow ugarlTUIJhglkgScyNvgbJWVhhxSOX5EXLLooM4MWLjA9nRSX7sDNroLWs3JYsBwCefH BLP2wDp9CcMnlaR8cUgCuoFfnAJ5sk4ZHDGhiTIREvfrFD/M1J2uviURIgAEkaw/smr/ rXTQ== X-Gm-Message-State: AOAM530AHsny9IrsM8284NVpEKASWFvbptPpPUWW7mQrKhQIkzo9gOJx Dn0M6chlGPfsRr8b+amrOZb2Lg== X-Google-Smtp-Source: ABdhPJxMguBsr/wqpFJYenKW1kgKjZ14CMSKwhl7GkzxfInD74Pwuz+I7SkVN+Ie4JDv9pw1igA3Bw== X-Received: by 2002:a63:9042:: with SMTP id a63mr2836319pge.345.1637118218135; Tue, 16 Nov 2021 19:03:38 -0800 (PST) Received: from laputa ([2400:4050:c3e1:100:90f8:8cb4:ef2e:56be]) by smtp.gmail.com with ESMTPSA id e6sm15059747pgf.59.2021.11.16.19.03.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 19:03:37 -0800 (PST) Date: Wed, 17 Nov 2021 12:03:34 +0900 From: AKASHI Takahiro To: Simon Glass Cc: U-Boot Mailing List Subject: Re: [RFC PATCH] RFC: Sketch of dm event notification Message-ID: <20211117030334.GD36373@laputa> Mail-Followup-To: AKASHI Takahiro , Simon Glass , U-Boot Mailing List References: <20211101030701.1629571-1-sjg@chromium.org> <20211101064150.GD25300@laputa> <20211117023133.GC36373@laputa> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 > 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 > > > > --- > > [..] > > Regards, > Simon