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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CCBE7C48286 for ; Thu, 1 Feb 2024 18:07:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vxO+dpu+oNEMMcJQ9eYtqEP3u4mqSkVSKrT2O8ZtllI=; b=yGM/WGbrMQ5giz JNMCfL0OkvmjHoINL+gKsZoyxkGmxuV47r5ZhODb2UbgL+d4rbYb8d/UejBHJsTrToorGeHmpxyEM PD3QsGRSuHhHxVw+H3NHrE2liWpsW7SkvONtBR3AGyLUIaD9Naf16AdYDvJB/kKZ6l6+6L/ZtKxFN cEeZlTT21AkZ0LjReQhDTrcrcupMkK4QuyMB7Y71vYFGeIep24ngEnF24UoYAV4wqEtvl1qsbXa4K hoSj+buaphf8P5MvjRl6noKV+TxcY5hF4TD2+tu+vGL2263yBC99id1KsRnWhHX9a6hroWcyCIMp3 OtI8gApEC9nHhm8IaKNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVbSx-00000008wB0-1KuI; Thu, 01 Feb 2024 18:07:11 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVbSt-00000008vkt-22Hi for linux-arm-kernel@lists.infradead.org; Thu, 01 Feb 2024 18:07:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wlDdr8NPiv5K6d89Bs5uSKYd3ZJ761NBPkhp6QHmjxU=; b=ihG4H+CxyyBjdudwZR3dMEQ0TK 7sxcRhO62L8ketQE7IZBEniIleIcd43plriDe1Ay652flED+oXwgx4ygMQippFmFk4TwuNnNu4Vn3 fWRF4K7TxQmjK3efqvMR0HNuxNTDQpdLGotizhkiN/BKzkQVUZ9wl95sX7jXC6ze36MJgivnWn4TU i0XwhS/rLkqRBgE7Lmgyyca2aXPuxN7DRsINUh6PZbeqwgi2y0eSFRzBEwoWVSTyGXMR6S/jvyEx6 1p7oHGDGtrEi4gZwENv7VFRpe7tI6Oe2ukCgRWhu2d/7mL17ieBYs9dYwb1/kA6682OA2ocuvrXP8 5iuYf9nQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:40810) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rVbQm-0004yf-0q; Thu, 01 Feb 2024 18:04:56 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rVbQj-0007YI-BP; Thu, 01 Feb 2024 18:04:53 +0000 Date: Thu, 1 Feb 2024 18:04:53 +0000 From: "Russell King (Oracle)" To: Stefan Wiehler Cc: Krzysztof Kozlowski , 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 Message-ID: References: <20240201123605.3037829-2-stefan.wiehler@nokia.com> <9da01fb1-9bab-436b-af49-783e44821b26@nokia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9da01fb1-9bab-436b-af49-783e44821b26@nokia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240201_100707_820519_89B4D929 X-CRM114-Status: GOOD ( 21.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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