Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp384769lqh; Tue, 7 May 2024 02:02:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcSPoWMwWoAf/xGWJ3B9gCuA1o2rB4EmVnpyifB5/VZYK/f5URRKCcEHsqlb+UkGBjjwDH5r0Cnsm08dH097elcX/is3R0u3u5ihJ3PQ== X-Google-Smtp-Source: AGHT+IGwxUzQwyK7Q8opHqc2SDciNo4czgGdx+H0HINmXEhq/bhLAHU2O6B1v00jS0CX3I7guoKY X-Received: by 2002:a17:906:eec2:b0:a59:db0f:6bd4 with SMTP id wu2-20020a170906eec200b00a59db0f6bd4mr3087070ejb.6.1715072556768; Tue, 07 May 2024 02:02:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715072556; cv=pass; d=google.com; s=arc-20160816; b=Ia/NuWl11oB6YcnxUeghhypQflpV6HkikgznwAlLwbr4NGz3RKp9QDHo6QWbYXTyw5 nffrUTducIEcGH5BT+ltPfRrarTVSlXO7t5SqH2POTeKu2knBwW+Tj4bfjdkecS2ha1C Vv7vhoT/OTqyDX2OZdvItLHVAOmrn/ZM9L2MaM01DGzGRukSzQsvfJ25aSDrQGLTprTU WP4+MjqIORMDq57hjzlrCl5n1W2fRXi5UCTenfoLpjxbORZ20T/ri8fff+AnBv6rtGQN 1ROKPRQEMzea5zcKxRWFqA0uJfjfhBX+XPg0Xcdo1k+ryseOnZSPyE01CGgyY+y+PwUb NI+Q== 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=qTeUuc0bHz0cA/z8apt4p7R4A60h6gxbSGcpsvYvivM=; fh=V/0B/518+vb3oH8eBAMBWg4wTV9WeOpsbcLgugd3fr0=; b=ToRoL6x19PxvMlqs3wz2vImTPzZqgbJofuyAmnXJVtSu3Wkzq9BOjFNNmmUWH93Ct0 cTbhKvyOCKVdUq+XbXvKPZaqh3g7OzEk3g8x5J5Gw0yBrx4eJmSM7qIScAp+o5BHGMiJ n/k9FbjarcHwaeKldD2+p6s4gjHJ6BCHQnGuEGu+Is4+KFDZy2yYiS4Ir3dqjERLiiau ne+UGZkYrTcSGSUCkqgTn1M9VVvK2HvdToLxtPW3aWA9KrvuAv0UcpkzpHKKrYBeOfhQ qqTonu4+w6bSmQKv62H/WYVYDwmdf/cSLMKbpg/yZhKGyIh6b53G0mIfPKSrQZUEY29l hAbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=dr1fBcRJ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=PQiDWfwC; 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-170903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q8-20020a170906a08800b00a59d43c09f2si1653210ejy.738.2024.05.07.02.02.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=dr1fBcRJ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=PQiDWfwC; 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-170903-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170903-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 am.mirrors.kernel.org (Postfix) with ESMTPS id E56861F24335 for ; Tue, 7 May 2024 09:02:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D3BC14D705; Tue, 7 May 2024 09:01:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="dr1fBcRJ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="PQiDWfwC" Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) (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 498D914D2BB; Tue, 7 May 2024 09:01:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072516; cv=none; b=AqgsfpgA02dr7rcOpRddm6n5WLc+mjUqlb5p0aTiULVYqoTokLQCjPGJstKl42mTyY7TN/utiWTCIGG93tlLcqqhxWpSai2OmFKQmXITDVsxaZzDroosu+F8AHB1iRtePBsXyE3rJYaiXC3z9MwxI4X4CgQnJhrrbeDgdY7+K5Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072516; c=relaxed/simple; bh=EgYZHI74g5P3QvmuzwztTxZvJrgG/TaQMR9K1Fjgx+s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T2BLxSbYWYUeJJCp6ucJqfkfJOZrWS1fJY5Bh2IO3bXGsdMXq3DtvOunR11nH2EKvW8vqhBvXHsxKUOUNThgrfbQmJ35atQC8vcr4WTOZw2LBejROqoFLgOS9ijEAkHmnJACiUAc7VzRpmNUPvc/jg9yGO+azsNxDwdKM3KM+jQ= 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=dr1fBcRJ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=PQiDWfwC; arc=none smtp.client-ip=103.168.172.155 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 compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 357B91140190; Tue, 7 May 2024 05:01:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 07 May 2024 05:01:53 -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=fm1; t=1715072513; x=1715158913; bh=qTeUuc0bHz0cA/z8apt4p7R4A60h6gxbSGcpsvYvivM=; b= dr1fBcRJmVKVJgGRWDDXj14tGSz1V5uZCG02zFW2yjEXOSCE40KKkk+dID/RRFo/ Fbzmey/U61Zj7pEqRK2dCdkifEA44uQ7nz/tB9O/0IrqMvL6W8Q124A9M1Sm9AXB EwSGRO4Hf2SURzAHzVZmpbToIfKklwKcpQFHHlhRn0r+m/OQOLnYEre60kn78CsB eUalnQbtgJoKFGopCsdk8B/Z5MZrJLHmOwYHwsMjhGRb15/wp+1fOG4N6LIu3EOP HymOVu7ffV/UMO3AVPJPtj1Kkl3r+yIF9ESZ/7D7+F42LfMam7cBA7sQvSiLOXcv E/mkCV6atlflT0QmvyWHNw== 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=fm3; t=1715072513; x= 1715158913; bh=qTeUuc0bHz0cA/z8apt4p7R4A60h6gxbSGcpsvYvivM=; b=P QiDWfwC0ZkNkNox3HRQZL2KZimb4hQll5S/gBo6ZYL1MPT3V1aRb3aN7zVNOAeJ5 z7Crc1yr4tw9H9RAwLq+eBl5+dC0O6YVuiGiuJ/YA+Pra9P69yRoXudh2t/pWqnp e+PHBwWVpN4wXpt5BxiY4AtcZrdII+BgqcpuHzb0TAVplIL1XnSYzJpbqfHp5BE9 DS0cmdeJ2JBIv0uLJR6vqC2XPU1C0fgGy5ZT6TLM+mVfUEuwD2JOy999OPcr/f2N TJ9KpLWZQUuxmolkXfxdIejI0jJ+s6T1+jEbtmUVo/vjW5VAXhjMYKXhXcnlveNN McZhKOmeC14SJ6DVbAhng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvkedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeflihgr gihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqne cuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtdduudeghfeu veegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 May 2024 05:01:51 -0400 (EDT) From: Jiaxun Yang Date: Tue, 07 May 2024 10:01:49 +0100 Subject: [PATCH 1/5] 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: <20240507-cm_probe-v1-1-11dbfd598f3c@flygoat.com> References: <20240507-cm_probe-v1-0-11dbfd598f3c@flygoat.com> In-Reply-To: <20240507-cm_probe-v1-0-11dbfd598f3c@flygoat.com> To: Paul Burton , Thomas Bogendoerfer , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: 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=EgYZHI74g5P3QvmuzwztTxZvJrgG/TaQMR9K1Fjgx+s=; b=owGbwMvMwCHmXMhTe71c8zDjabUkhjTLt/8rOvT2nfHeNE1kY9HMFzPTuXaqOl8Okzi0f9lt8 /OrOXZt6ChlYRDjYJAVU2QJEVDq29B4ccH1B1l/YOawMoEMYeDiFICJdMgyMhz9z+OxxMry9tuK uGhtV+ZXG3f/DIydFlB4tMckzl75xiOG/zWZnAH/pXeWGj1Z7Tqxz+bKuuQfhaJJ+bc7ha9o7JD 8zQMA 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.34.1