Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2832591pxb; Mon, 19 Apr 2021 15:26:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJGblN5Qzeiwdb62iVB5uv91Zh7yK//Ah56zqlNOPSBZwg1joAoGpHLz/O9RACy8FjWepx X-Received: by 2002:a62:82c8:0:b029:25a:b502:e1aa with SMTP id w191-20020a6282c80000b029025ab502e1aamr2450234pfd.64.1618871194422; Mon, 19 Apr 2021 15:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618871194; cv=none; d=google.com; s=arc-20160816; b=ODv4+0eASFdNfvpzz1cdp233AoN54SbfLpMF59F600QJwoG5AE04+VWqLvW5J9gzTp vTUrICeez9BUKeiewEKPtP+pQ1BRR4PyYuwhmDbCilDzqjYRZclsnKeZfEyZHhsRFy74 X1BdgH9KUhq9f/dcs0jLhFfgUP9FJPZkKknFgD7KfUfDUltOfZ7gHj3pBX35KHj7tMY0 D5miL/V4jeKb/A/QLbu9yGOI7er72iALWVx33Rm42nVg2ASRQiji816k8XEeR0zjEyS+ ZH9wFOYLePkl+WYqp7TEqn2Rfpi3VEDJ4nTi3kKaacFmRE24lki21KZevKNvXOl2krpN fJsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=m6S5a27XwiY+zw2zQj/wf9pW+FKt1GxPvhxiAfqirjc=; b=BztVZzNSddgQHHzwq2iu4LysB7AxyTODOAkt6BzyMmn2oIiedNXgyAzGMJiQ1Qff/H fB9Z+DosjMzJ4C3hEtbdJc6z0EVCzMVteGvqjSmvRyT6CnnkSIY3v2IOPOa+w0lIIydA qgpsGagTgiFsG4TigTFXdbIFxrxXQ1WXxE/9jy4988XuZAkRwySJbCKY7GXTMt0UI80a 0ob5EeZbt/fEMd9XjdrvZbFAD7YWwKnAenANww2Q3nMUYJlSTWOhobPoosgL9KmW4zqT 6jRe+vF0/3G+spKV9ffOZafieZohcOLJ654F1wBI5l8ANJzPsLNTXYmpGz8u0jrSnoQN PfLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CBYPsCb/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si19269117pld.334.2021.04.19.15.26.22; Mon, 19 Apr 2021 15:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CBYPsCb/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239410AbhDSUwr (ORCPT + 99 others); Mon, 19 Apr 2021 16:52:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:55020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243038AbhDSUuT (ORCPT ); Mon, 19 Apr 2021 16:50:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BA18B61402; Mon, 19 Apr 2021 20:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618865178; bh=07caHPhzZxVAkO5mCF9RtGW81v4eRFptXroX2W2y9/4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CBYPsCb/aKJ3hoo0j6Dpo+CpBLMl1Pj4Bl2u67XCcDtMRRHaByO30t97Az0nhAe2w 5LXUMCOM1YrwMP7++nuKlKeK+WBUmU6lRuJXklGNq3AKdkFK0POFykAogkFMF7aBMs 6jl/bWOx0fPVD1aH+hx+/wXfp0T4vrbr04t5l+miaHSy33/5dbfXJ4kEvA2nzWMLoK eeCWpir30OkY50ZlUDstFJZp3y83ELwOrCMHyfjVgQ0b8iqgmAbo1eZwhxvMBcn9Cp 4yvEg36DzcUtdXWmxohpmqLDYgRGC8qxTiyOzAyUB7giqdIX9u23uHFdinlGmKOxGG vQDIS57w3fDDg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Randy Dunlap , Mike Rapoport , Andrew Morton , Linus Torvalds , Sasha Levin , linux-ia64@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 6/7] ia64: fix discontig.c section mismatches Date: Mon, 19 Apr 2021 16:46:07 -0400 Message-Id: <20210419204608.7191-6-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210419204608.7191-1-sashal@kernel.org> References: <20210419204608.7191-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit e2af9da4f867a1a54f1252bf3abc1a5c63951778 ] Fix IA64 discontig.c Section mismatch warnings. When CONFIG_SPARSEMEM=y and CONFIG_MEMORY_HOTPLUG=y, the functions computer_pernodesize() and scatter_node_data() should not be marked as __meminit because they are needed after init, on any memory hotplug event. Also, early_nr_cpus_node() is called by compute_pernodesize(), so early_nr_cpus_node() cannot be __meminit either. WARNING: modpost: vmlinux.o(.text.unlikely+0x1612): Section mismatch in reference from the function arch_alloc_nodedata() to the function .meminit.text:compute_pernodesize() The function arch_alloc_nodedata() references the function __meminit compute_pernodesize(). This is often because arch_alloc_nodedata lacks a __meminit annotation or the annotation of compute_pernodesize is wrong. WARNING: modpost: vmlinux.o(.text.unlikely+0x1692): Section mismatch in reference from the function arch_refresh_nodedata() to the function .meminit.text:scatter_node_data() The function arch_refresh_nodedata() references the function __meminit scatter_node_data(). This is often because arch_refresh_nodedata lacks a __meminit annotation or the annotation of scatter_node_data is wrong. WARNING: modpost: vmlinux.o(.text.unlikely+0x1502): Section mismatch in reference from the function compute_pernodesize() to the function .meminit.text:early_nr_cpus_node() The function compute_pernodesize() references the function __meminit early_nr_cpus_node(). This is often because compute_pernodesize lacks a __meminit annotation or the annotation of early_nr_cpus_node is wrong. Link: https://lkml.kernel.org/r/20210411001201.3069-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- arch/ia64/mm/discontig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 878626805369..3b0c892953ab 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c @@ -99,7 +99,7 @@ static int __init build_node_maps(unsigned long start, unsigned long len, * acpi_boot_init() (which builds the node_to_cpu_mask array) hasn't been * called yet. Note that node 0 will also count all non-existent cpus. */ -static int __meminit early_nr_cpus_node(int node) +static int early_nr_cpus_node(int node) { int cpu, n = 0; @@ -114,7 +114,7 @@ static int __meminit early_nr_cpus_node(int node) * compute_pernodesize - compute size of pernode data * @node: the node id. */ -static unsigned long __meminit compute_pernodesize(int node) +static unsigned long compute_pernodesize(int node) { unsigned long pernodesize = 0, cpus; @@ -411,7 +411,7 @@ static void __init reserve_pernode_space(void) } } -static void __meminit scatter_node_data(void) +static void scatter_node_data(void) { pg_data_t **dst; int node; -- 2.30.2