Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp630761lqo; Thu, 16 May 2024 17:33:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGpsMLPSceZapBoOwtfH2y+DUox7VagbbtY6htfvRtFwBuU6hRXolbKxcooVwAmobUOy1m4lFTQ9ngXPdj4TStr84lS7kiFly9uEjjnQ== X-Google-Smtp-Source: AGHT+IELzSWe19ZJrbyh5+bWsPLpUm03TP3YziEjgl0Asqivwip/hpM/xrD8pBu1t3Ciz35ohPGM X-Received: by 2002:a50:9fc9:0:b0:570:5b70:3407 with SMTP id 4fb4d7f45d1cf-5734d5c0c84mr18181082a12.10.1715906022292; Thu, 16 May 2024 17:33:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715906022; cv=pass; d=google.com; s=arc-20160816; b=jYQ3GVd0TBEdPP8PwO8NsK9FsIcmU7/MVZvXGbf+5Qbau112oLJ56VtlwPWNYnFiiR 9n0g5SfPIVqVtvoZjeZ0FUJbG6UPJtNQwQlaX9VvQF54V8ctHOtmMqni8AQV09AQs1n5 jeHllJmnHFAF+JtiwPDfkCmyki3k00uXHWizV7kWAESmKK3VkOqq0r5Tq+epcTQS3kmL FHx4cxuEIPLiaDZ6CDjGOGE/KW6DJeC11XM4LcMTHwlrKz+Fv0rUlkp2wJtu1hEnSe14 ErhM6+h5deOjYhZh9DGLmiAKcvkfESWw6HCKZQ94+KFGU4uP4A1dXRwsPf5vxA4PIV9r 3MdA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=EsIH3T0HNLatBAFUrqQmyzw0Hsq/ma0UHEPMARiatV8=; fh=V8mZuAVcP2ohcMotRXZCKvLGdPMG+hLwi01Q7VQlibc=; b=p/xfAEieykqe1qx5le5MbDsRFs97Tr0i6qKOvnzK7zitKQ/34pXkeh7ZKZOWq7PyA0 JMvSfm2s/b5qbURaiC3HELAFSHGku8GJtlkljsHV1IMx8KwzdXBa5GsHK6aLVoy2Ghgr Q5Aj7+hpr+ZDMAdFmfzChPTSUwFpnEpDAB/qhhmBRdjvVQBDsF5oSIl1aXVFP9KgpflY o6zBqxXUcphACpP7dhEWf/tyN6cBCuOzNV9KnNFMBat2Ff5R7JkWxkbiVt24ryPyfx+C Z2+mnlmA8EuY//Xh/Fji/PG8zLvJR5bfrc7YAXQ0hQYsM+lU2oqx8WKVoi0LFhyR4gtC nVQw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HD7Szvyn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-181652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181652-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d61d8si9117244a12.290.2024.05.16.17.33.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 17:33:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HD7Szvyn; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-181652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181652-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0C4C71F220D3 for ; Fri, 17 May 2024 00:33:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3288EC4; Fri, 17 May 2024 00:33:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HD7Szvyn" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12283389; Fri, 17 May 2024 00:33:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715906014; cv=none; b=oWdY8+o8vM+DIBMjeNWAzFz7YZIFcemQJVKQTzZPYp6EG7XFAz7NzFDOd/yQVj7pRCe8sYTjpB9TlESckmzG/2dmuI9V8QduACyY3zrkCW6IhJE+CmERJvwpvRYsrLErOztjY/kM1tzxaJfwv9RgcMcMJmfX7h59Q4TS7M6RaAQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715906014; c=relaxed/simple; bh=NtdMFwjCCg6DRe8jJko5fsFCy+aStnuV7IT8PB1A13Y=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=QH93JmupedKdsukGr94Z+8CWlw//qBNegTkGO0UCvdSU8NZC2M5nnlnM4e1Yka5bfrFs1wUDeQEeEuqYAEFRSrtygLELhq1GuONS9YKjFAxucLHTCf/IHxQcPLJ+tuNw2ZSbaJyThPRZs2I6fOhJ9HLNFnqSY4VEA7yaEoFFx9Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HD7Szvyn; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7095DC113CC; Fri, 17 May 2024 00:33:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715906013; bh=NtdMFwjCCg6DRe8jJko5fsFCy+aStnuV7IT8PB1A13Y=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=HD7SzvynKcjYOsvcvN/G2QU4qpCjqTri3qEAUXZJKLDZd8DaMG3OHyjJWQvd/PNSN Hp3G5XPAdtvJsu/IhGFHIdDEP2qwIMy4G3HWe3wmKLvS+77nMDzpRF/H7juYwzhCcq LGYLU2dy6v05RtemPVjwjMaeiojcS/Ic8eojFv8JE+gKUbdF69Pbpkr13ptXIlpgBb 1vc6a+nFcvDpsnmOhOSw7xMZ/50XnFVYsNWeU9GCgkfaUDR53tPeRIlPGD9gpFI+ZI 6R4pkCX9kR4SJYk04QKvI8BF6y67hgnec7XugZyYDBNO47GSXeReF5OSF4XIhCiqNk fHuH7AyWjgkQQ== Message-ID: Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20240422232404.213174-1-sboyd@kernel.org> <5c919f0d3d72fe1592a11c45545e8a60.sboyd@kernel.org> Subject: Re: [PATCH v4 00/10] clk: Add kunit tests for fixed rate and parent data From: Stephen Boyd Cc: David Gow , Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, devicetree@vger.kernel.org, Brendan Higgins , Rae Moar , Greg Kroah-Hartman , Rafael J . Wysocki , Saravana Kannan , Daniel Latypov , Christian Marangi , Krzysztof Kozlowski , Conor Dooley , Maxime Ripard To: Rob Herring Date: Thu, 16 May 2024 17:33:31 -0700 User-Agent: alot/0.10 Quoting Rob Herring (2024-05-15 15:08:47) > On Wed, May 15, 2024 at 4:15=E2=80=AFPM Stephen Boyd w= rote: > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > > index 389d4ea6bfc1..acecefcfdba7 100644 > > --- a/drivers/of/platform.c > > +++ b/drivers/of/platform.c > > @@ -421,6 +421,7 @@ int of_platform_bus_probe(struct device_node *root, > > if (of_match_node(matches, root)) { > > rc =3D of_platform_bus_create(root, matches, NULL, pare= nt, false); > > } else for_each_child_of_node(root, child) { > > + of_node_set_flag(root, OF_POPULATED_BUS); >=20 > No, the same spot as of_platform_populate has it. I guess this would > be the same, but no reason to do this in the for_each_child_of_node > loop... Ok. I'm not intending to send this patch. >=20 > > if (!of_match_node(matches, child)) > > continue; > > rc =3D of_platform_bus_create(child, matches, NULL, par= ent, false); > > > > > > This doesn't work though. I see that prom_init() is called, which > > constructs a DTB and flattens it to be unflattened by > > unflatten_device_tree(). The powerpc machine type used by qemu is > > PLATFORM_PSERIES_LPAR. It looks like it never calls > > of_platform_bus_probe() from the pseries platform code. >=20 > Huh. Maybe pseries doesn't have any platform devices? Looks like it. >=20 > Ideally, we'd still do it in of_platform_default_populate_init(), but > if you look at the history, you'll see that broke some PPC boards > (damn initcall ordering). >=20 > > What about skipping the OF_POPULATED_BUS check, or skipping the check > > when the parent is the root node? This is the if condition that's > > giving the headache. >=20 > I don't think we should just remove it, but a root node check seems fine. >=20 Alright. I've added a check to see if the root node is the parent to allow it. That works well enough, so I'll send that in v5.