Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp338460lqp; Wed, 12 Jun 2024 03:09:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGCKkiO8GXhdqzzusiCEgUW1VT05B1QE1px0KPfpctFRAhholmu5NzV/0q0YKITZxhh+sA8/AV4xzK6sX5rv+N9LU+tJ0o/jLl7SdGHw== X-Google-Smtp-Source: AGHT+IG4A+CZ4mgJ1tI/1H/uc5zvEQeGIdTqBq9ow/N8AMVJsp4X/B1QgtIULxne4nGaiTxyac4S X-Received: by 2002:a17:90a:ea18:b0:2c4:af82:32b1 with SMTP id 98e67ed59e1d1-2c4af8233afmr548080a91.1.1718186974050; Wed, 12 Jun 2024 03:09:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718186974; cv=pass; d=google.com; s=arc-20160816; b=Hh5wrKZxlpMDD2kkFGCVGXKCy5FCL3E4ADJJEogft9woeVWnSGDnEc4JvrWhZB6cZM UWdWY1DvE3//DPlRfLODesk/KRguxhsScHtcqltz+tEhEwPRZzmnQsj+2Q4GYOGwI/rN DftxSmGE5J5xH3uDtVsDYC4pAJ8QtLaJqUYhTg68f14NYO7DNTqD53+FoYjsCkuPSG9/ zRyknE6EvvVE41izu/aD5fyWmoIF0ek5AUT+RstrQc4xKLzWvwdCC9H59KS8vD8h6twh OcNxFuZztlRQQF3jfUl6cLJH/Zn/dlxSy+yoXEeGd87sinO6nPQOD5Flv9xUCcElj2VR KKIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:feedback-id:dkim-signature:dkim-signature; bh=CiqfuQg7+Awtvvk00+xR7dgerLeRnYRgj+KbFfygLoU=; fh=qiNtu2cWk68hYivofTHRibE3jmi7UziuUm6soyA9tIU=; b=1KWeYNKiZ8Bz5tu0FblLzioGhN/QH16XzNipW5AsqRXxF5ovYwh6V/4VQcIudIelJA H+M4WVsi2TGNXToT5tuXUAQmTiJ8twS0s90KzTM0OIy7vOzJqLpu8yYodRBR+7bu3BiX I11LSrLkaJz7Ogp7jnQ52ohzlqn2pFBajCHFPxj5LlPDPyuSLFl36nwBGAPAGWB52pdu bmDmad+X6HgX9bxN0OIWp1weq3HHjHc1GQuqdKSfm4BjEWuHUjOO4aQxYhl5LL+6n2wI NBVOUyHe1o76poCUsLFM06CLX++gKRRuopOlrfFK8b2o9NHoN9LzCrT8Kl8qJRqErHhL l+lw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=R6VtR+h4; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=o5o2ybuz; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-211329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e60b3e4b49si7345418a12.23.2024.06.12.03.09.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:09:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=R6VtR+h4; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=o5o2ybuz; arc=pass (i=1 spf=pass spfdomain=flygoat.com dkim=pass dkdomain=flygoat.com dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=flygoat.com); spf=pass (google.com: domain of linux-kernel+bounces-211329-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A5FAD281A0C for ; Wed, 12 Jun 2024 10:09:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C06C816EC1E; Wed, 12 Jun 2024 10:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="R6VtR+h4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="o5o2ybuz" Received: from fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (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 5783C16EBE7; Wed, 12 Jun 2024 10:08:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.149 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186939; cv=none; b=MdPWTZhqh6Wxjg4oKhPXOjtdzKJLk0UMLsydOYshEd8hUUNK40tZpu8BROC5Lk446z2Yrn/Dg1Ug+HLOb1mh3j+JS6HeOABZZKAtrEImafQEZ2ElMowPiem0yg7Y1mZn2lf5wd5XbS1iBJtsF5QTwTVN1xbTQBHEDecxYnATuQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186939; c=relaxed/simple; bh=voKuxxI6H6hzGI213nmIUem7TQCBrF9kKfmcvE7bN6c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c+3NoIF/VkhW82UyI5nKVswYjzkiF9kZ7eSSpZOywIFDwBxl3MlgvCU7zFQFdh++RN00hAwo6+4WiBByd+EKJbXwjTE6i7rmBfhWs/SHNXoa9Yftrv+7xphq/ajU9bgbKVJWOTt17VFpQg57R+fDT4/VJ4qjwSOX/EhqHpLl11E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com; spf=pass smtp.mailfrom=flygoat.com; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b=R6VtR+h4; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=o5o2ybuz; arc=none smtp.client-ip=103.168.172.149 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 694EE13801B0; Wed, 12 Jun 2024 06:08:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 12 Jun 2024 06:08:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1718186937; x=1718273337; bh=CiqfuQg7+Awtvvk00+xR7dgerLeRnYRgj+KbFfygLoU=; b= R6VtR+h4IK4uSTH6dmzkOiEJ4+r4N5IN4L91RNVnqFiNnGa0sTehdRqCzXtUBg1C Tp61v+pUdmcekK86IicYBUWJCeWx71Vxj6mrx1glHFZ+7PzRrAELzMi9FamUHn5C uto6d9t5qxXjuuj3X+iyXluOREtJWQHwEIMMQrxu96O18Pp5UDrZzhh25tivaGe5 3ciSEMMmc5Wup8QNzE2Z4PNf1ZS+N0YCn/UCsI/aSLm1M9Dakr+gGckSO3Lh2V5O 3Mi2DOx+zrACqe70lSsnaiQYbFT6G6AqX3Anc+N9B7FsGpQQXVJjESbFXYqMifFk 1vGmR6wG9S3fBWzoITufSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718186937; x= 1718273337; bh=CiqfuQg7+Awtvvk00+xR7dgerLeRnYRgj+KbFfygLoU=; b=o 5o2ybuzyxz3aXU96eyAF5pu7p4BNbpSCofoU3xPo9/Vh4nqiIWxo2eKnUKgftV5V 3mKSU12mLrPDJapcbZoQjX/Jmcc+4bPiBj0uAcgURopPMeRymDS2y9Y2DpGJmHz4 FBBOttZzvCybtCBgwTys7iOL1djZ0cMLwcryFLUI2I+aG1JgwLw35g4jyhZzlTF8 HokKta1kjA4/OzmJCphyxeZ9zajW3h7Bthi8Ct6ciUL/cjfHljTDptkuLgu61Uq2 VifpyDHbrJr3tnpkd1RL12PgjKAK1CSvC7NIDmbvwrp5fyXG+hI0j0I9+RDrXm/x g/tbxEFHxdgMViPSgjLPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedugedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeflihgr gihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqne cuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtdduudeghfeu veegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Jun 2024 06:08:55 -0400 (EDT) From: Jiaxun Yang Date: Wed, 12 Jun 2024 11:08:53 +0100 Subject: [PATCH v2 1/6] MIPS: generic: Do __dt_setup_arch in prom_init 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240612-cm_probe-v2-1-a5b55440563c@flygoat.com> References: <20240612-cm_probe-v2-0-a5b55440563c@flygoat.com> In-Reply-To: <20240612-cm_probe-v2-0-a5b55440563c@flygoat.com> To: Paul Burton , Thomas Bogendoerfer , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Serge Semin , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jiaxun Yang X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1100; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=voKuxxI6H6hzGI213nmIUem7TQCBrF9kKfmcvE7bN6c=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhrTM4m0+yvdaIwOf3Ji78p6TyZHbh+T/iT/lOzdPJMtE2 3N9oeTTjlIWBjEuBlkxRZYQAaW+DY0XF1x/kPUHZg4rE8gQBi5OAZiI8hpGhk7dTzzMO0sioiRN X2slswlcLzolFBB6eoF++3SrboZKBYb/0cw7U1ROXruRM0/lrMC8w5XsfPI/L36Z477s9UWOK3+ reAA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 We want fdt parse functions to be available as early as possible, thus do __dt_setup_arch immediately after we get fdt address in prom_init. Signed-off-by: Jiaxun Yang --- arch/mips/generic/init.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c index 1d712eac1617..9fd09061de78 100644 --- a/arch/mips/generic/init.c +++ b/arch/mips/generic/init.c @@ -26,8 +26,12 @@ static __initconst const void *mach_match_data; void __init prom_init(void) { + fw_init_cmdline(); plat_get_fdt(); BUG_ON(!fdt); + if (mach && mach->fixup_fdt) + fdt = mach->fixup_fdt(fdt, mach_match_data); + __dt_setup_arch((void *)fdt); } void __init *plat_get_fdt(void) @@ -101,11 +105,6 @@ void __init plat_fdt_relocated(void *new_location) void __init plat_mem_setup(void) { - if (mach && mach->fixup_fdt) - fdt = mach->fixup_fdt(fdt, mach_match_data); - - fw_init_cmdline(); - __dt_setup_arch((void *)fdt); } void __init device_tree_init(void) -- 2.43.0