From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Stefan Wiehler <stefan.wiehler@nokia.com>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RESEND] arm: topology: Fix missing clock-frequency property warning
Date: Thu, 1 Feb 2024 18:04:53 +0000 [thread overview]
Message-ID: <ZbvdRXsvY2qBXApS@shell.armlinux.org.uk> (raw)
In-Reply-To: <9da01fb1-9bab-436b-af49-783e44821b26@nokia.com>
On Thu, Feb 01, 2024 at 04:03:59PM +0100, Stefan Wiehler wrote:
> > Does this mean the /cpus property is like a default for when a CPU node
> > doesn't specify the clock frequency, or does it mean that the /cpus
> > property should only exist when all the values for each CPU are
> > identical and thus the individual CPU node clock frequency should
> > not be specified.
>
> Good question, the device tree specification in Section 3.7 [1] says:
>
> > The /cpus node may contain properties that are common across cpu
> nodes. See Section 3.8 for details.
>
> And in Section 3.8 [2]:
>
> > Properties that have identical values across cpu nodes may be placed
> > in the /cpus node instead. A client program must first examine a
> > specific cpu node, but if an expected property is not found then it
> > should look at the parent /cpus node. This results in a less verbose
> > representation of properties which are identical across all CPUs.
>
> So I think it is pretty clear that it should only be used for
> common/identical values.
Thanks for the clarification.
As this is DT specified behaviour, I question whether it should be
implemented in arch/arm/kernel/topology.c - what I'm meaning is
a helper such as:
const void *of_get_cpu_property(const struct device_node *node,
const char *name, int *lenp)
{
const void *res;
res = of_get_property(node, name, lenp);
if (!res) {
node = of_find_node_by_path("/cpus");
if (node)
res = of_get_property(node, name, lenp);
of_node_put(node);
}
return res;
}
?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-01 18:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 12:36 [PATCH RESEND] arm: topology: Fix missing clock-frequency property warning Stefan Wiehler
2024-02-01 13:16 ` Russell King (Oracle)
2024-02-01 13:16 ` Krzysztof Kozlowski
2024-02-01 15:03 ` Stefan Wiehler
2024-02-01 18:04 ` Russell King (Oracle) [this message]
2024-02-02 10:58 ` Krzysztof Kozlowski
-- strict thread matches above, loose matches on Subject: below --
2024-01-05 13:00 Stefan Wiehler
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=ZbvdRXsvY2qBXApS@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stefan.wiehler@nokia.com \
/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).