Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp338664lqp; Wed, 12 Jun 2024 03:10:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrO9mK/huctNzVmc4YlA3EJT71KIH2pgy6ier7djsUpjCrvSFpY2zPPkddLLpi/t6iUzKElvetrsz3TBEeohCn46gnnNVx35I/RGPwUg== X-Google-Smtp-Source: AGHT+IHfWiAC2no+xSMqDMaSXzBD+O+7IARQKYitjh4HAgOmWvP2x44vPuCfM8Mjb7n8eZnpzGZI X-Received: by 2002:a05:6e02:1e0c:b0:374:5a2d:178 with SMTP id e9e14a558f8ab-375cd159c47mr14179315ab.2.1718187002342; Wed, 12 Jun 2024 03:10:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718187002; cv=pass; d=google.com; s=arc-20160816; b=vixz+GmCtTzNrs6ltvHeLrsNghd1pv8nUORhlVitq7Z0qcQLS/zTNShxbC/KroYCw7 6Q73ASi+GhMKnTFrTzwxUmDC3XOTde3/IKEyDtJS7ttSRRgm/4Tiq69rRmDsXPQD1ann K9dXG4PLT/OEM9e/4kXiNYLNn7HHCnYw1iuCeZu6fnwyhe8kAoTdchrqp16n16y8/jmk ZyBThrPv1uNMZe7wuqImYX05B0ZowA3WJNtLWKt9UUa9QQWWTB4hlQmkgCZ07+OoVQDa kb1Cjn+E2KVQWVF6U4WJZOQPWY7V+QeboB1NMhP9ee+4ErVvG3Qsjv+VNYqJycnN9c2i 9QIg== 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=ME8F+XqC310IYsmGwC1YPl83RIAnc2BQJcZl9+YKsk8=; fh=qiNtu2cWk68hYivofTHRibE3jmi7UziuUm6soyA9tIU=; b=FeTzEJAbZ5f6/l7nokexiCncEDmRWz20PrI3cnrGWnO3WjjlECn6BYrNFIyVHHKphf Kegyo50yhqhWRWKICXXTY5szzfXnAmsalg4hXIagzEAn/Nq5zg8L8Tgsqc6v6pImNN2D w9ybziMfJsL2SZWP6X3/wKuy4wywnCWvwu2wJmWxBmMEV7L9xQeNkZDd0SQqHKdCyU0C 5ofvt2VXnA7AWLJPZDW3LiPSwHUmgIKHP1mCuDk6zg3gjljWSHkiqTlGuMa6zBmLDtJC UpNa3VhaqQozyN3goAbZLd4rNEZymumKTjk64oh0HYYPVusCSIcDn6z25S9M5+wM18Wu tFcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=p17wLWbU; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=VBvGGXK4; 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-211331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211331-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de262c0523si11036241a12.350.2024.06.12.03.10.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:10:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=p17wLWbU; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=VBvGGXK4; 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-211331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211331-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 B96CF281895 for ; Wed, 12 Jun 2024 10:10:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5260016F278; Wed, 12 Jun 2024 10:09:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="p17wLWbU"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="VBvGGXK4" 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 B945C16F0D5; Wed, 12 Jun 2024 10:09:01 +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=1718186943; cv=none; b=ZkpRsltvlwlWfZDs39kjb4snwhpIZ6QpRw7rMyz+wKijiiwvwVR0Owj0WwhOVdb31u6Neh742YU6F/kZmFI/RObzlfoNk3ZJL/rNPOdNFwNam2Jox5eoOq0KnOZ+yoLnHArIgQV35fQ+kFxpzRLlkv+mIc5KH5PviGcEbHIfgb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186943; c=relaxed/simple; bh=XaML8d7PwntPZwxYpSjOKhtex7IC7jZFHkIAfP9/r/4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fiJ7oUnAcA/zX0bmqAPfqQxRVL0tFnyCu6pWUzQtgN45VeGQrofvTg2ocYuktQ+IesGKHSeI/KvmQV7oeQ7zEmXYAcuP/0EWDNSH4tDlJmF78W6DD3HaRuysqBZyFmc9rEDyTZjU6IdP2kyOxgi1qGgdedNZeSasSAEVxQ+qNB4= 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=p17wLWbU; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=VBvGGXK4; 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 compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id CA1E711401C1; Wed, 12 Jun 2024 06:09:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 12 Jun 2024 06:09:00 -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=1718186940; x=1718273340; bh=ME8F+XqC310IYsmGwC1YPl83RIAnc2BQJcZl9+YKsk8=; b= p17wLWbUSxHphyr+GfbjuFnfETXKFUSCwA1f7yuMobRUxf7EpqmJ3gzrm06oo6TC DqodjnvdE2kx+ti43ZQLoO9IIfITaGDPdb1ThD8/sg89pFe9EasZKnkUmZ5XdZNJ rSbV1eAjcDwmQ6limuGc0BPCAaGMTqG+qdAucoMHXgKvyltr2nQWIqR92UKU00bD f+IMV+FEKlKhXHQpYdtqJX4ple2yS9/3VS+9NSSn5Qq2BgUR5WzA7YPgCDhk3TJV 5qAu15n6PHK0aSnIEDeI2muPWRr1LipacpP+YR91sK2HeGWhDkkUfA4tAXe87rXF bjHs5HtjzV7dtDfG8oVfKg== 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=1718186940; x= 1718273340; bh=ME8F+XqC310IYsmGwC1YPl83RIAnc2BQJcZl9+YKsk8=; b=V BvGGXK4biKeRRfeVppLcS9rrnI4Wv3Xe8MYYxTOZzHp9RYXlobR7r+ZUXeJE1p2S xvQ68Klr7S80dpIIWzGGCmFuPjQ0Q184gTEmlhvzVam39sYiwEI4sRmqGqWL1stt fBsnwNskaEIrqdDIsIITgHRAIJoRiF2Re1sYd62Y0OxoAq6ZRoNV5x7ylq5eFhZ/ 3keqivK/eRpWBgqF2Nu/mdWIQlN2Kt+Mr1UEd5QWEYH2d/DCSz65/N87WmGA4DEC x3fARuO1py6T76/axvY5oW+L31bO2YSRZ4XHXcRKnmuKanx1uQAZMCdlunSG7/gf kfXBLaeNwQMmL3ixq5X+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedugedgvdefucetufdoteggodetrfdotf 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:59 -0400 (EDT) From: Jiaxun Yang Date: Wed, 12 Jun 2024 11:08:55 +0100 Subject: [PATCH v2 3/6] MIPS: cm: Prefix probe functions with __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-3-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=2498; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=XaML8d7PwntPZwxYpSjOKhtex7IC7jZFHkIAfP9/r/4=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhrTM4m3PAlZftHBpLHROXMixLaTd5WLejL4+nnsSrPPCN m6qTX/dUcrCIMbFICumyBIioNS3ofHigusPsv7AzGFlAhnCwMUpABPJnsjwh6Or9OOEme7ym6S3 Rv7P1dg26ZrH+Ygu9cykBrfEtxd1pjAy/M/8fOdLYqdae/+bvXGTlXd1Gb1I+vXIlO2Og2JIXkw +GwA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Those functions are only used at boot time. Prefix them with __init so they can be discarded after boot. Signed-off-by: Jiaxun Yang --- arch/mips/include/asm/mips-cm.h | 4 ++-- arch/mips/kernel/mips-cm.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/include/asm/mips-cm.h b/arch/mips/include/asm/mips-cm.h index c2930a75b7e4..5292b516d60b 100644 --- a/arch/mips/include/asm/mips-cm.h +++ b/arch/mips/include/asm/mips-cm.h @@ -30,7 +30,7 @@ extern void __iomem *mips_cm_l2sync_base; * and may be overridden by platforms which determine this address in a * different way by defining a function with the same prototype. */ -extern phys_addr_t mips_cm_phys_base(void); +extern phys_addr_t __init mips_cm_phys_base(void); /** * mips_cm_l2sync_phys_base - retrieve the physical base address of the CM @@ -43,7 +43,7 @@ extern phys_addr_t mips_cm_phys_base(void); * determine this address in a different way by defining a function with the * same prototype. */ -extern phys_addr_t mips_cm_l2sync_phys_base(void); +extern phys_addr_t __init mips_cm_l2sync_phys_base(void); /* * mips_cm_is64 - determine CM register width diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c index 3a115fab5573..dddc9428fe58 100644 --- a/arch/mips/kernel/mips-cm.c +++ b/arch/mips/kernel/mips-cm.c @@ -179,7 +179,7 @@ static char *cm3_causes[32] = { static DEFINE_PER_CPU_ALIGNED(spinlock_t, cm_core_lock); static DEFINE_PER_CPU_ALIGNED(unsigned long, cm_core_lock_flags); -phys_addr_t __weak mips_cm_phys_base(void) +phys_addr_t __init __weak mips_cm_phys_base(void) { unsigned long cmgcr; @@ -198,7 +198,7 @@ phys_addr_t __weak mips_cm_phys_base(void) return (cmgcr & MIPS_CMGCRF_BASE) << (36 - 32); } -phys_addr_t __weak mips_cm_l2sync_phys_base(void) +phys_addr_t __init __weak mips_cm_l2sync_phys_base(void) { u32 base_reg; @@ -214,7 +214,7 @@ phys_addr_t __weak mips_cm_l2sync_phys_base(void) return mips_cm_phys_base() + MIPS_CM_GCR_SIZE; } -static void mips_cm_probe_l2sync(void) +static void __init mips_cm_probe_l2sync(void) { unsigned major_rev; phys_addr_t addr; @@ -237,7 +237,7 @@ static void mips_cm_probe_l2sync(void) mips_cm_l2sync_base = ioremap(addr, MIPS_CM_L2SYNC_SIZE); } -int mips_cm_probe(void) +int __init mips_cm_probe(void) { phys_addr_t addr; u32 base_reg; -- 2.43.0