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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 69437C433EF for ; Tue, 28 Dec 2021 08:32:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA5E483898; Tue, 28 Dec 2021 09:32:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="G6GCCEkt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 231D48388A; Tue, 28 Dec 2021 09:32:29 +0100 (CET) Received: from mail-vk1-xa2b.google.com (mail-vk1-xa2b.google.com [IPv6:2607:f8b0:4864:20::a2b]) (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 3D8D38388A for ; Tue, 28 Dec 2021 09:32:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vk1-xa2b.google.com with SMTP id u1so9734287vkn.10 for ; Tue, 28 Dec 2021 00:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Gt9IR00XBS1TcUtiNMoHLLP7Rp3jg6xLFkdSs0huCiY=; b=G6GCCEktEhO7OafChe8peB9oiAIuhEdz9VL+OSRoZNy4vOTZHHgvcdpXooqWIc7yat e86JuooMWIQ0SxwEsAC305kHcz7MtNoRt3z9bZyEFVYOcO7KzrH3icn1qA/tpMabRcAl DBR68XKNzjAFNZyPpWjYXYMCm+JAGRvwYnIgc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Gt9IR00XBS1TcUtiNMoHLLP7Rp3jg6xLFkdSs0huCiY=; b=V1liKFgbCQ8WttzobIqH3XWDJdGQTnEGqyJKS+mUi5KO/OYdazPurZA3qbrPELMkMx Kd7G6GFbeheEHchIfTyVzYeY+vJL2Y9AMumKN5PYE9HYbvaVvCtJqxt3b/MLzJucq17m RfMs9pK9HK2rBPBoTZG7FYwZJcgyISaauk3OaiF/JYlB7t9tsSBXVcW2a0E+qDwTfvA3 27ld9FeOgTTcnwcHpDyFiHpd2rQqIK53YfqbXJ8rYk1TDu4Q08pgyPCpNyWwJ+HY8wrY nj0Ga7Ubu1CSlEBpFTHw4j9feUp1sxJMD/e80Dy21zDlxKpNlLCQY/pYBeZJXPkfFTBb YxdA== X-Gm-Message-State: AOAM530AELwl8iEeY09YpyWXZkLuKYsdnfpJFLUlrlhrb0vw7JGdSicY anUvt8wJJXnyberYiTxgR0qFpRo8+EmU7Hy6uAgi+g== X-Google-Smtp-Source: ABdhPJyTIHrKp0q9iokvSb3yftVGo9NiYu7wO/dYsXcdWVRtJU1MxjZ6hy7Br+xADdX7l1PGuRBY82eLE4btY1+YZxk= X-Received: by 2002:ac5:c848:: with SMTP id g8mr6191647vkm.3.1640680341792; Tue, 28 Dec 2021 00:32:21 -0800 (PST) MIME-Version: 1.0 References: <20211210064947.73361-1-takahiro.akashi@linaro.org> <20211210064947.73361-13-takahiro.akashi@linaro.org> <20211214070532.GB49357@laputa> In-Reply-To: <20211214070532.GB49357@laputa> From: Simon Glass Date: Tue, 28 Dec 2021 01:32:01 -0700 Message-ID: Subject: Re: [RFC v2 12/20] dm: add tag support To: AKASHI Takahiro , Simon Glass , Heinrich Schuchardt , Alex Graf , Ilias Apalodimas , Masami Hiramatsu , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 Hi Takahiro, On Tue, 14 Dec 2021 at 00:05, AKASHI Takahiro wrote: > > On Mon, Dec 13, 2021 at 05:51:45AM -0700, Simon Glass wrote: > > Hi Takahiro, > > > > On Thu, 9 Dec 2021 at 23:58, AKASHI Takahiro wrote: > > > > > > With dm-tag feature, any U-Boot subsystem is allowed to associate > > > arbitrary number of data with a particular udevice. This can been > > > see as expanding "struct udevice" without modifying the definition. > > > > > > As a first user, UEFI subsystem makes use of tags to associate > > > an efi_disk object with a block device. > > > > > > Signed-off-by: AKASHI Takahiro > > > --- > > > drivers/core/Makefile | 2 +- > > > drivers/core/tag.c | 162 ++++++++++++++++++++++++++++++++++++++++++ > > > include/dm/tag.h | 76 ++++++++++++++++++++ > > > 3 files changed, 239 insertions(+), 1 deletion(-) > > > create mode 100644 drivers/core/tag.c > > > create mode 100644 include/dm/tag.h > > > > Needs comments and a test, but looks good. > > > > How does the list itself get inited? > > Isn't LIST_HEAD(dmtag_list) enough? Yes but that is a BSS var so cannot be used in SPL or before relocation. How about moving it to global_data? Regards, Simon