Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp385064lqh; Tue, 7 May 2024 02:03:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXnh/0qJLtt150ev6naMuciwmM9xBeglWnUosG1nNPeXRPhUfqAPXmwA1xTRRBsmQ4VMSev9KejlGYOqVJCODrMuQjAr5vVnJySCesRDA== X-Google-Smtp-Source: AGHT+IGnWrbwauL+F8XZLEIZoyomdtap579wVrxliusab83jCwxMnPu1QLz8PwIX7c/jKhWgreOO X-Received: by 2002:a0c:aa98:0:b0:6a0:d1f3:1992 with SMTP id 6a1803df08f44-6a146005884mr32512596d6.9.1715072591317; Tue, 07 May 2024 02:03:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715072591; cv=pass; d=google.com; s=arc-20160816; b=y7N+v1FpdZtvOipuyCyAGbsROeE2sE+Cp9CaFX0xiROf4gDWDil5hd4vsqputMFBHJ DK8yiwEDKOIk7FFXEeXFr7jzC+Ce8k4t+uGKWxDpeMEr3BUaUwjELybewOaIDgaImpGY gJhO8ejlKSruDnUo1Dpq5+Yl3z2YgSI3GuGTuAZGVHQfyvtJML+vQRfMdJytysIGaz9m rjW5aQPAF8/kj5eS9vRiUbqS1Oexexbqj0iRvyegJdYXX3yEaQJ+CcslMZUqIRFb08/R +9z9j5NuQeX9uc2nu/TFsEG+jSda7qUrgLsYuGb+YROzHdDMjLFWPlVgvIxxruS6PLy2 ikkw== 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=APx6dCBrTJqezVBXHJ/h9FJ/vWqO9ascL5/qldxUb9s=; fh=V/0B/518+vb3oH8eBAMBWg4wTV9WeOpsbcLgugd3fr0=; b=jc6KrSqOcgBqNYBZGAR1dXgny+ueWI1q11Jf2y3Rs3V/G2ggM5fgjbZSfhuf2dmjD2 cd1md0h5UAPgWq110EWXJyGQFC/K/Ms67EP/wl/T5/oQSthvw6+xs1zSZC7p2JbqCiUW apW0Ac+cP3u95OPa1l6Du70J87k/0Y5sbG6NkUMKSJW4JkG1AwNricsft3nFI+on9wTE Dwl+IYYP/+uv0Ijb2T7SIgjjyj11QaB8JMl/SikkuGwcDkonQDRDx119NVXNfDXhglDd /N8Lxlzq4CaYFMuNVGOeiKo4V9y01tqQZkh0phqVNZSUijFuStIxLitJLg5hvmXcqAXj 5VIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=Z8voWQ7E; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hHxaTtul; 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-170904-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170904-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id kl18-20020a056214519200b006a0a4cf9f69si11086891qvb.443.2024.05.07.02.03.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170904-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=Z8voWQ7E; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=hHxaTtul; 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-170904-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170904-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6EC961C2360B for ; Tue, 7 May 2024 09:02:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 833DE14D71A; Tue, 7 May 2024 09:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=flygoat.com header.i=@flygoat.com header.b="Z8voWQ7E"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hHxaTtul" Received: from fout8-smtp.messagingengine.com (fout8-smtp.messagingengine.com [103.168.172.151]) (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 B0B0014D458; Tue, 7 May 2024 09:01:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072517; cv=none; b=da+pLxKcY63MtA+f1VF/RKZ1IVG9NYG0Ut9z44GiYYRexd7AJvyy3iIIKtsxzgyvTpD+97GVbhdZ4daMD0nCiW3I9GxuDKsxPrkSNSn2cFXm8aEZKPOBqlMU8ySs1iKcULAPun2U4BaF/kKyG5yD4fHSWoQ55UksTRLvhw1yIn4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715072517; c=relaxed/simple; bh=SLgeVPAUIVYffojO40aOD2FkVjz1kvjwA4zqDsv9YXo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=msbslvQrLo0kwlJAvIa1BGU3ArgzIbppHcRlBjRr04vryxjlxGbb6GRiF12kVZcJbmaDQAfQLnSZhWFbYSC/dbgT+Tuy6S7pq+zxqSM07CaAjCQgnYaMzgV+dSn/C7RwcF1FfKZn84Bud/Fu8sS0V1Q1sTQ1eVuI9nPMSbLRraA= 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=Z8voWQ7E; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hHxaTtul; arc=none smtp.client-ip=103.168.172.151 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 compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id B5CF91380283; Tue, 7 May 2024 05:01:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 07 May 2024 05:01:54 -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=1715072514; x=1715158914; bh=APx6dCBrTJqezVBXHJ/h9FJ/vWqO9ascL5/qldxUb9s=; b= Z8voWQ7ETaOMAsoDvVabsUQevXrG6ih9v/3o8lHv/KzxbTvKMtZtZ3+1PTc4pXnq kI3Hw5dvwDSfaaGB6r3UO2Cy1A8NvwAwhlqS5qXCgZUjH6HWzwQv+zs1KNA5KKlR snm21G10KXbCmzdd/c42afUJ7ObsmvFNaIxnAnQoTEPtWZFpbryr4plovMuuuamM TwQEyfakqyegUBkRKepCJAIpP+OEddS5egzyZxWt1VGeXu9F2KBm8YIk9OqPrtgm w1sHxYBIEOvIDp3zAxB9WV3ZdLmYzuteiu3FpuVDFdJBPMp0tdjQ3yhcI/4JEPvq Myu2oY8N08Ai893mitCdEA== 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=1715072514; x= 1715158914; bh=APx6dCBrTJqezVBXHJ/h9FJ/vWqO9ascL5/qldxUb9s=; b=h HxaTtulfTegmMQf1UL46YadT1ThNFZ+0z6McFH3cZklEh/tPnzdebM6rkbsYa7l0 2WsbJsdNQ8WcYJy0eOjjb1y9EVVglabhljelShZhc9DlkfP5H+k43EbFMHSJviKP ydA6neirGrKwZIhLBj/F1HL3pxhcYu3q2i+iClKGh3MnVQ5b+tZ6IBjTkUGNgAcC +jMIupt3/NJelWq5kHwBC6QCqwPqldqmO86mjfF5zRN4WZt1AH0VtzJhCBmZOIhq bMvPjNIT2QWkcVRe+u3nV2A1XGMEpTfsivZT+PbAZh7Ts5X6KDbQeObjkCGpraOj JfrDnUm/v8YFAIXG7kKPQ== 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:53 -0400 (EDT) From: Jiaxun Yang Date: Tue, 07 May 2024 10:01:50 +0100 Subject: [PATCH 2/5] 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: <20240507-cm_probe-v1-2-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=2498; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=SLgeVPAUIVYffojO40aOD2FkVjz1kvjwA4zqDsv9YXo=; b=owGbwMvMwCHmXMhTe71c8zDjabUkhjTLt/879SpaDhjy57Cr8bNKrrRfcsLQzVh4Tde5wOZ/9 zXPuFt2lLIwiHEwyIopsoQIKPVtaLy44PqDrD8wc1iZQIYwcHEKwEQ2LWJk2Nt6utjdSyU+ZtX3 FPWrzwLKneclqbxxvvXvgKST4AGvewy/WY2VJixl5Jp9xfBty882MdXy1INV9R2r+99GnbcNFTT iAwA= 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.34.1