Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1451008rdb; Fri, 16 Feb 2024 17:23:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVuCGp7uBd9jc7wgRsgFV90N3T324yY1XL9d/rvmH+jkBhdcIPlwc1tvsRo5Y2u132v30pE310TcPInH9KAv9DfXIo8JLdIgbEUmwi5+g== X-Google-Smtp-Source: AGHT+IFSzWvpM2ZhXT50YLYgM3/StAOUbrMdQcb0NqIHiFfJXz2b/Yia635/+yUvb2waQNhNaQFj X-Received: by 2002:a05:6870:d8d:b0:21e:53c3:331e with SMTP id mj13-20020a0568700d8d00b0021e53c3331emr5863600oab.4.1708132990541; Fri, 16 Feb 2024 17:23:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708132990; cv=pass; d=google.com; s=arc-20160816; b=qLWgSHMUTziaaV1jMHNdwxphUsnpO9eGa1i48PPsoLMqvS8leOw2oI4Z7IE/lU/cej H6jTSvNuVjR8bu7MaxaibxlVUPcx0xE7Wg9hl0L+M7qW18ME0QOP9qn8vAut+rCYpjLi gYcFi2LHnTnOx1LPijE9vmyf0P4QB5ATaLr3AtZPgdCgS2QLHgd2u+o9XAl5uJQ3HNpS DuU/TzxzKMtoqhx1JBN6ZOLVZHuPPkeBQIXtbVRvMC05hZEPnhzVsgwGnIvgZEsekVfo 1WMzg7RFhuLIWO5g+DLFtMt0MvKEY7OYj2aIt1Y01nlvQMLKquuL8aBazxwzN54J52pk xnwQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=f6Ys8FPEhgXvqlylTOVJOo7KlGjQhGaUKR9xz0jyv0I=; fh=9xLTKyG5LLeWwVhC/s1cfm3V7bFxJkLIOBVCvZG8d5Q=; b=CjSLuAufo1xd9bWl/uAdeMB2phaOr7vpvM2T0mN7YR+A9ZPpbksvk3UoqK6lHhQfas ejOwBShheay/Oqw/mCZCCgnVa/30Si4j+lLz2gD2IVEdDIZ6H/982Wx/8ROWRau+8AtP sKkXt2yxlUfofSLIZiINY6zPIek992yx0CU+o6zwdakhtM1wv4NzKPWxoyMknB1XV8+2 A+qoKST2t92MdPS/2EIl4eHlX0jVC3bpSfIANKP7Flr4Z8PhR+nXheZfqkjZYFFdULy8 Bi5M4Vqe2EBII6wBiYy55p5pZd+XyrbQS6CW5sgxWlKMs6sqWWeYnlSGpl+1UsPe9CU9 JF2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="mLu/fetq"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69630-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y21-20020a637d15000000b005cdaa0544cfsi678352pgc.670.2024.02.16.17.23.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 17:23:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="mLu/fetq"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-69630-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69630-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B9A71B25354 for ; Sat, 17 Feb 2024 01:10:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EED6F21A19; Sat, 17 Feb 2024 01:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mLu/fetq" 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 08A5620DC4; Sat, 17 Feb 2024 01:06:02 +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=1708131963; cv=none; b=dOLlFoESSts2UCMHKLQiZhmY22N4DHzqqcwsIJE4ZTnpQ7NMhLzpWmIuh0LyYXidL5QAKicPrtxiOSZa1zZbEH69wZPnEGejkUfK2rBiGSZqTujCf2cr7WnVrcdalLb5pBSXA+3u7EescOIMHODRy8COY2Ye+D8Yl47HTFj7S+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708131963; c=relaxed/simple; bh=1HWmL/t+ml480s8rBnTxQKeWVgi/0Mqu3CbJKyMEIU4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=W+y5L5PyH+VYeBMySDzAvoDfhvcv/XurRPybcTHWByhSoTEFIJAI3R8QZ3+SQyLBBtqEZQC/QlbKVOt5wECkAFUmLqFZXbCnZAvV3FklFDFzwROa1f80xj6v8GsHYBPMNWNr5JaSbn3vvE+ea0zDZeRWv27vdxIYyrYwxzIEE80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mLu/fetq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68291C433B1; Sat, 17 Feb 2024 01:06:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708131962; bh=1HWmL/t+ml480s8rBnTxQKeWVgi/0Mqu3CbJKyMEIU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mLu/fetqM+cb3tFtOHS4DOL5HzdsL62p8HCA7st+6zWovNRgJDBAgQnu6PXC1+c9G HFZmLUhjJAsUY3SYQrxRX0DJ51MCTu7WUqyLaRDBYT0p7U3hhqasKo3LofYMLnFUmS wyRODHMZMXZEjB75NprcfvwHNV/GncU03JL5Uh+3ni6KVVnTXs0sqEPcJRHZZ5VUhZ KDwZy/JMZPFcz3N3YG14+nEDcPwAloywz+fsCh01BgyNBj0GdXEtQLT9hc25xBrUQB JooWdwLPYjQZABiqq2n0BCu5ZwpDE4wcww/s7bAxn5H8dLXJcIiin859FkSNqXFBMd ex/bdl98FQEGg== From: Stephen Boyd To: Rob Herring Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, linux-um@lists.infradead.org, linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, devicetree@vger.kernel.org, Frank Rowand , Catalin Marinas , Will Deacon , Mark Rutland Subject: [PATCH v4 5/7] arm64: Unconditionally call unflatten_device_tree() Date: Fri, 16 Feb 2024 17:05:54 -0800 Message-ID: <20240217010557.2381548-6-sboyd@kernel.org> X-Mailer: git-send-email 2.44.0.rc0.258.g7320e95886-goog In-Reply-To: <20240217010557.2381548-1-sboyd@kernel.org> References: <20240217010557.2381548-1-sboyd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a firmware provided or builtin DTB. When ACPI is in use, unflatten_device_tree() ignores the 'initial_boot_params' pointer so the live DT on those systems won't be whatever that's pointing to. Similarly, when kexec copies the DT data the previous kernel to the new one on ACPI systems, of_kexec_alloc_and_setup_fdt() will ignore the live DT (the empty root one) and copy the 'initial_boot_params' data. Cc: Rob Herring Cc: Frank Rowand Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Signed-off-by: Stephen Boyd --- arch/arm64/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 42c690bb2d60..0d210720d47d 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -351,8 +351,7 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) /* Parse the ACPI tables for possible boot-time configuration */ acpi_boot_table_init(); - if (acpi_disabled) - unflatten_device_tree(); + unflatten_device_tree(); bootmem_init(); -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git