Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Han Gao <rabenda.cn@gmail.com>
To: linux-riscv@lists.infradead.org,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>,
	"Andy Chiu" <andybnac@gmail.com>,
	"Han Gao" <rabenda.cn@gmail.com>,
	"Guo Weikang" <guoweikang.kernel@gmail.com>,
	"Kuan-Wei Chiu" <visitorckw@gmail.com>,
	"Björn Töpel" <bjorn@rivosinc.com>,
	"Zixian Zeng" <sycamoremoon376@gmail.com>,
	"Usama Arif" <usamaarif642@gmail.com>,
	"Yong-Xuan Wang" <yongxuan.wang@sifive.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] riscv: acpi: chose to boot from acpi then disable FDT
Date: Wed, 10 Sep 2025 19:24:01 +0800	[thread overview]
Message-ID: <20250910112401.552987-1-rabenda.cn@gmail.com> (raw)

avoid errors caused by repeated driver initialization.

commit 3505f30fb6a9 ("ARM64 / ACPI: If we chose to boot from acpi then disable FDT")

Signed-off-by: Han Gao <rabenda.cn@gmail.com>
---
 arch/riscv/kernel/setup.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index f90cce7a3ace..d7ee62837aa4 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -330,11 +330,14 @@ void __init setup_arch(char **cmdline_p)
 	/* Parse the ACPI tables for possible boot-time configuration */
 	acpi_boot_table_init();
 
+	if (acpi_disabled) {
 #if IS_ENABLED(CONFIG_BUILTIN_DTB)
-	unflatten_and_copy_device_tree();
+		unflatten_and_copy_device_tree();
 #else
-	unflatten_device_tree();
+		unflatten_device_tree();
 #endif
+	}
+
 	misc_mem_init();
 
 	init_resources();
-- 
2.47.3


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2025-09-10 11:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10 11:24 Han Gao [this message]
2025-10-10  2:27 ` [PATCH] riscv: acpi: chose to boot from acpi then disable FDT patchwork-bot+linux-riscv

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=20250910112401.552987-1-rabenda.cn@gmail.com \
    --to=rabenda.cn@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex@ghiti.fr \
    --cc=andybnac@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn@rivosinc.com \
    --cc=guoweikang.kernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rppt@kernel.org \
    --cc=sycamoremoon376@gmail.com \
    --cc=usamaarif642@gmail.com \
    --cc=visitorckw@gmail.com \
    --cc=yongxuan.wang@sifive.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