From: Dmitry Osipenko <digetx@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] misc: sram: Generate unique names for subpools
Date: Tue, 20 Jun 2023 11:23:41 +0300 [thread overview]
Message-ID: <b50a7438-1c7c-bc54-a6e7-0ef1caa31a16@gmail.com> (raw)
In-Reply-To: <CACRpkdagHDUz4P0Z81ZqyhJD97gfn=p1=fx1dwKTrO8J3zkPrw@mail.gmail.com>
19.06.2023 10:11, Linus Walleij пишет:
> On Sun, Jun 18, 2023 at 11:33 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>
>>> if (!label)
>>> - label = child->name;
>>> -
>>> - block->label = devm_kstrdup(sram->dev,
>>> - label, GFP_KERNEL);
>>> + block->label = devm_kasprintf(sram->dev, GFP_KERNEL,
>>> + "%s", dev_name(sram->dev));
>>
>> This broke device-trees that have no label property.
>
> Which system is affected? Asking so I can inspect the DTS file
> and figure out how this needs to work.
NVIDIA Tegra2/3 video decoder driver fails to probe with this change.
https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/nvidia/tegra-vde/vde.c#L312
https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/tegra20.dtsi#L347
>> The SRAM DT binding says:
>>
>> "
>> label:
>> description:
>> The name for the reserved partition, if omitted, the label is taken
>> from the node name excluding the unit address.
>> "
>>
>> Not sure whether breakage was on purpose, otherwise doc needs to be
>> updated or there should be explicit check for the duplicated node names.
>>
>> Secondly, AFAICS, the dev_name(sram->dev) is the name of the parent SRAM
>> device and not of the children sub-nodes, hence it's now always the same
>> dev_name(sram->dev) for all sub-nodes.
>
> Sounds like I should go back to the original approach in patch v1:
> https://lore.kernel.org/linux-devicetree/20230417-ux500-sram-v1-2-5924988bb835@linaro.org/
>
> and also augment the DTS binding text to say it uses the full node name
> including the address.
>
> Does that look OK to you, or will this regress your system as well?
That may work, but then seems you'll also need to update
of_gen_pool_get() to use np_pool->full_name instead of np_pool->name.
https://elixir.bootlin.com/linux/latest/source/lib/genalloc.c#L898
prev parent reply other threads:[~2023-06-20 8:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 21:17 [PATCH v2 0/2] SRAM dt binding and fix Linus Walleij
2023-04-20 21:17 ` [PATCH v2 1/2] dt-bindings: sram: Add compatible for ST-Ericsson U8500 eSRAM Linus Walleij
2023-04-20 21:17 ` [PATCH v2 2/2] misc: sram: Generate unique names for subpools Linus Walleij
2023-06-18 21:33 ` Dmitry Osipenko
2023-06-19 7:11 ` Linus Walleij
2023-06-20 8:23 ` Dmitry Osipenko [this message]
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=b50a7438-1c7c-bc54-a6e7-0ef1caa31a16@gmail.com \
--to=digetx@gmail.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).