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 7148ACFC5EB for ; Thu, 10 Oct 2024 17:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id: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-Owner; bh=rRhUwsjJ+keJDaHb+y5KpcHyh0NFIfAnajg+LaPx+k8=; b=Z1EIsNuTLaM9W51D1QNfV3nYDn uqxULUuCGVRNNDdDaPlBMXc+Bthtww2PoH7OjcVpKeHo0HeLb55s7qmvfrVhRcNmxIdTD42RObF6r PfR66DIIIxCJuuS6TtG04ZMUxHxC9/juoXORRWBGbEzyPVXpMr3CNYCmqAda4AWU2PqmGwUMyKI/W sHI5KM22mpRey/uUR07aGxiprOCvIAqWz9bFAFQ61Tw4I0R/wpqlRWXye7HrD6wJGLyyFs0MNPCMI OdWz8Xhu9QhU9SjkmY7ssA9xGDs5W3MysWXER7YRCLt+eQJfZnyvqORVXIwfJivf8NEyRN/6b7HeG MCnDdo1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syxEM-0000000Dipk-3c9U; Thu, 10 Oct 2024 17:45:43 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syxCI-0000000Dhrw-2YOs for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2024 17:43:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 0C393A44C58; Thu, 10 Oct 2024 17:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7225C4CEC5; Thu, 10 Oct 2024 17:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728582213; bh=RMXsM9+daLz0wDlNHh/0NCwE/l30K6rBnwaZjnhUduA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MmxR6ljDZQNaWsEGh7lI3NoP4YGIF6dWWnYUA8Agmgo8+GqnzBrafKDgimmEhJ2ry 6x3dON7Jwnhb2c5BZzwPshbhzha8PFSYiH25FRM1LCKZqIMDZNHajfecrd0AUTYekj Cx9fFrSWP5lRSRWJdCnWdXeWroZ3kc+Pr/j9tZIYOY/BcDH45JqyAm3zaKnhz/rPs1 ig03hT4DRM+FFDVHJvXMo8rJ8LClpUbU8jbjVj8675Onmp6oMVwnh9qYLzY1SHpKP4 j+4dQ5nfuH0AH2bxM+8k90zuf5D1acObMwGe8kRH2a29LZ7kM7vPx2uJXewtKgSF+c MiWyH8PYUXmeg== Date: Thu, 10 Oct 2024 12:43:31 -0500 From: "Rob Herring (Arm)" To: Stephen Boyd Cc: patches@lists.linux.dev, devicetree@vger.kernel.org, Saravana Kannan , linux-kernel@vger.kernel.org, David Gow , Guenter Roeck , linux-arm-kernel@lists.infradead.org, Mark Rutland Subject: Re: [PATCH] of: Skip kunit tests when arm64+ACPI doesn't populate root node Message-ID: <172858218311.2064946.5279211050619703517.robh@kernel.org> References: <20241009204133.1169931-1-sboyd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241009204133.1169931-1-sboyd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241010_104334_732959_2164F49A X-CRM114-Status: GOOD ( 15.80 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 09 Oct 2024 13:41:31 -0700, Stephen Boyd wrote: > A root node is required to apply DT overlays. A root node is usually > present after commit 7b937cc243e5 ("of: Create of_root if no dtb > provided by firmware"), except for on arm64 systems booted with ACPI > tables. In that case, the root node is intentionally not populated > because it would "allow DT devices to be instantiated atop an ACPI base > system"[1]. > > Introduce an OF function that skips the kunit test if the root node > isn't populated. Limit the test to when both CONFIG_ARM64 and > CONFIG_ACPI are set, because otherwise the lack of a root node is a bug. > Make the function private and take a kunit test parameter so that it > can't be abused to test for the presence of the root node in non-test > code. > > Use this function to skip tests that require the root node. Currently > that's the DT tests and any tests that apply overlays. > > Reported-by: Guenter Roeck > Closes: https://lore.kernel.org/r/6cd337fb-38f0-41cb-b942-5844b84433db@roeck-us.net > Link: https://lore.kernel.org/r/Zd4dQpHO7em1ji67@FVFF77S0Q05N.cambridge.arm.com [1] > Fixes: 893ecc6d2d61 ("of: Add KUnit test to confirm DTB is loaded") > Signed-off-by: Stephen Boyd > --- > drivers/of/of_kunit_helpers.c | 15 +++++++++++++++ > drivers/of/of_private.h | 3 +++ > drivers/of/of_test.c | 3 +++ > drivers/of/overlay_test.c | 3 +++ > 4 files changed, 24 insertions(+) > Applied, thanks!