Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp393238rdb; Tue, 16 Jan 2024 03:51:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOAVl7+AXO0mlQ+A2vxaeAY/ayzlCmQ8OR07UyeTcS/vwd7vg6R5hXNGlbUDnFMuE/eVXA X-Received: by 2002:a05:620a:165b:b0:783:52d2:8cd with SMTP id c27-20020a05620a165b00b0078352d208cdmr5461659qko.26.1705405896000; Tue, 16 Jan 2024 03:51:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705405895; cv=none; d=google.com; s=arc-20160816; b=TGA8mJlB4F4DPzieuGaqHUcALMDcuBkC/8YdlNFoLwcxfqMp8smrbN46WWxZPYERBJ qO8BrYD+MXk8JlR0TC6ChjfiDuxHl1tbliCpVLsAslhgETNhp9MkmwJkKA62AXCluqXF UcCWeQoW8mDIb+Y9v5p+a1XuLwIIz+1PyN8mRGFSLJQFzjOn5BQm2GOQ2htSBdOpEhKA Ic0HHehpWtBS4shIesWIAvxmG27bRmUV+f8kV+O3o6bpT+KoEW98c+gUpDOvCVS4btyx 5wDv08QAA/NiZDZmU2XbiH9884UF+cE41a2cVQ7ts5W4FB7gtkH8dRvBat+7oAAoyGRL HiPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=NauUEfz2pO3mejpNkHDKuvbNLXuZ7XAFMAu6fTkOYgs=; fh=khD42urHrRrcl758VgtHQYOE4yL+kho1BcdRGhk0cIA=; b=gQkRGDuTcVFInwL+ru/Q8Cw8XKHSE+sxz1V7v7/fb8nWA0owFpOpnkU0GCwsr/FcXh +GsgnxYwaP8b+begqnY4Gl4lerbo7XZzHy0uj6hLmEfE7ALsakhiMGCA64tBfRtM8jCV slhhfkadCqSpaWySYPeQn2M0o7urWaxAQZavMLHbPJst2s90ELFOAELXVuDQUJjQyhBR INFx5NyAo6XkqzFmNO2GHkMEStOuqn9f+fZzQecP3Ti13gBOP29oj5Ae9wMNUOZj8wPr xyjoivpfOFVddkX0hEHj5L40Ny7kr1fVVcEpS5C6W67P4gxod6taoTZWi6PO4GUp3pvu FlRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27348-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id du32-20020a05620a47e000b0077f10ed7a98si9083839qkb.489.2024.01.16.03.51.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 03:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27348-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27348-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27348-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BDA1A1C2276C for ; Tue, 16 Jan 2024 11:51:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDA541B95F; Tue, 16 Jan 2024 11:51:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E90331B949; Tue, 16 Jan 2024 11:51:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5BD412F4; Tue, 16 Jan 2024 03:52:10 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.90.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 50E793F5A1; Tue, 16 Jan 2024 03:51:20 -0800 (PST) Date: Tue, 16 Jan 2024 11:51:14 +0000 From: Mark Rutland To: Stephen Boyd Cc: Rob Herring , 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 Subject: Re: [PATCH 1/6] arm64: Unconditionally call unflatten_device_tree() Message-ID: References: <20240112200750.4062441-1-sboyd@kernel.org> <20240112200750.4062441-2-sboyd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240112200750.4062441-2-sboyd@kernel.org> Hi Stephen, On Fri, Jan 12, 2024 at 12:07:44PM -0800, Stephen Boyd wrote: > 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. > There's no harm in calling unflatten_device_tree() unconditionally. For better or worse, that's not true: there are systems the provide both a DTB *and* ACPI tables, and we must not consume both at the same time as those can clash and cause all sorts of problems. In addition, we don't want people being "clever" and describing disparate portions of their system in ACPI and DT. It is a very deliberate choice to not unflatten the DTB when ACPI is in use, and I don't think we want to reopen this can of worms. Given that, I'm afraid I must NAK this patch. Thanks Mark. > If there isn't a valid initial_boot_params dtb then unflatten_device_tree() > returns early. > > Cc: Rob Herring > Cc: Frank Rowand > Cc: Catalin Marinas > Cc: Will Deacon > 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 417a8a86b2db..ede3d59dabf0 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 > >