From patchwork Tue Feb 20 11:36:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rongwei Wang X-Patchwork-Id: 13563895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB693C48BC4 for ; Tue, 20 Feb 2024 11:36:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 373AD6B0072; Tue, 20 Feb 2024 06:36:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3255E6B0078; Tue, 20 Feb 2024 06:36:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6E176B0072; Tue, 20 Feb 2024 06:36:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CA41B6B0071 for ; Tue, 20 Feb 2024 06:36:49 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 98F5A160612 for ; Tue, 20 Feb 2024 11:36:49 +0000 (UTC) X-FDA: 81811980138.03.660C688 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf18.hostedemail.com (Postfix) with ESMTP id 274A61C0007 for ; Tue, 20 Feb 2024 11:36:45 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b="N/0phye1"; spf=pass (imf18.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708429008; a=rsa-sha256; cv=none; b=MV8rlBGShyyG4bR3m/Bk6ZwT/T2moU2b00YLL0ig/iwDPh2XevJ/NsrSKR7CdfAF7cHxi/ Y6Y2d8HagsXrCCd4fHe/ZAUMnH9RKFb+NCO+o1Qg7oRXfzjrz+NiCYXNcjEijiIp9f/Cwi U+Oq1k8FXZYgzftMgBqjHoZLBWaE4KI= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b="N/0phye1"; spf=pass (imf18.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708429008; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=RBOoxvuwLWFkRyLKl1klmLDhYCLGEFN4RBXhRrClOKs=; b=CDRpRgRp5cOh9kCJpDduqt7/EsLs5vpKe7CfsfyFeZed5VPZm0CNwSx8fX30RVf4aZlNRJ YwA0/Al6qWDbibWx2gOh4ClcuGLRLFajqJ++g4Dyu3SHyBeY833Z+2ATsonoM30u/EA/sD WzjzGwc5lDZhfQK5JkKYAepcC8RL2fc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1708429002; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=RBOoxvuwLWFkRyLKl1klmLDhYCLGEFN4RBXhRrClOKs=; b=N/0phye1KMu7lcFiw1rSxdcMCj0o0YMoVYzXOC1Oh14JIB0xgHjWBdWQUUcmtQgs6YQFVVxIXzAr0mbVNkCgCjacFjGehIV5RfhJ8gfywLyQp/WgxihkRyU59Tl6fq6q4Sn5mVQ9ahY2BifOTr7x2HyXoc1wUlOG1Ppo6pYL6Tc= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0W0wabr5_1708429001; Received: from localhost.localdomain(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0W0wabr5_1708429001) by smtp.aliyun-inc.com; Tue, 20 Feb 2024 19:36:41 +0800 From: Rongwei Wang To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, gregkh@linuxfoundation.org, rafael@kernel.org, pierre.gondois@arm.com, mingo@redhat.com, dave.hansen@linux.intel.com, luto@kernel.org, teng.ma@linux.alibaba.com Subject: [PATCH v1 1/2] arch_numa: remove __init for early_cpu_to_node Date: Tue, 20 Feb 2024 19:36:01 +0800 Message-Id: <20240220113602.6943-2-rongwei.wang@linux.alibaba.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20240220113602.6943-1-rongwei.wang@linux.alibaba.com> References: <20231012024842.99703-1-rongwei.wang@linux.alibaba.com> <20240220113602.6943-1-rongwei.wang@linux.alibaba.com> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 274A61C0007 X-Stat-Signature: xtihgifteo3mfnqg68r5wnaf41ddwcc9 X-Rspam-User: X-HE-Tag: 1708429005-347341 X-HE-Meta: U2FsdGVkX18eAICY+lOt+bcAMgYjQZXC/MfJfnReaJmJKNgCp2/BzJBEs+0GP4ALb/TOGGv8JQMKZSdFmtf8z3pc/GnLzRPgTSKCkcxGAahvM/4FNwyZKkGMZgiC5rrZRAJGoqHZUKgE5awerV5X23Tnc+MH+nmHSlkITEJopAtE5iU39LKz7tElM7fmASg707DFCIHXMbnOhLb+XaMt1o8gLp4bJWQkmyQcqcowxBp/JNQS0rigSIPfVSNXEpVxDg9VsfOf/H9KS3I5KArQ5EXse/xIwEu/a8qym9x5Dp/XkVRKzCDAkNnJ2VzZP4kEwGtBCzOLSt0HEPU5gq9pcasWtTcg308CqcM7cDpk0PSpVrQDt3giDfwRSU06Ptw4blrpBONBCAl6j3fYXSeUsE8wxueWOMDq2nXanIdqcI0iDS3TjTO2ZCONRpp6mlud91p946r/3qI0O2kn8lAibsed6qmY9MvoFGxdXQpIe90Rg0bcLetrSjfIzR4tcb2ioYzSY2WloozW+xG47ml4cNa6WxoYF0cN6ruZehwDNxW+3+ccpk2gifTRgk65py33wy6JOyQ1fclDYP0v6438VQCwr3qcJXlnXGHB3egbslc2IiEBIYPp+D6pkYLKNuyN0B4M+YI+PZOKC0Zwuxl3667E31Fqj9tYmNcit+1VIfVaNM/ttpzw+qdTLuqkkXHN15pjSGnai142ljN5p4CU39ACVaQnN7d8UdJ70MVmoeGGEjRLhaGb5GyXeuZy8X8m9/nLX+PzJx8t97IiytZhujvv1/Bpcel3HWTLANHtFE0zlT+gl9h2rC1ZTI9M68Y4AULRwHZqInlYfiPBwYIQTDJVKnEAM3HJKxxletmRRHBIPq0jM5auqFMYULRuuGVUBnWuKKU2BOY0K36h0LCmOUhZ9kQhKLWyT93122cZWw5ZI7YYTNzh36CN/dj5O/PDkm31SCjPPHs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Next, in order to support other arch, early_cpu_to_node() will be called in a general function. We have to delete '__init' to avoid warning messages during compiling. Signed-off-by: Rongwei Wang Signed-off-by: Teng Ma --- drivers/base/arch_numa.c | 2 +- include/asm-generic/numa.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index 5b59d133b6af..90519d981471 100644 --- a/drivers/base/arch_numa.c +++ b/drivers/base/arch_numa.c @@ -144,7 +144,7 @@ void __init early_map_cpu_to_node(unsigned int cpu, int nid) unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; EXPORT_SYMBOL(__per_cpu_offset); -int __init early_cpu_to_node(int cpu) +int early_cpu_to_node(int cpu) { return cpu_to_node_map[cpu]; } diff --git a/include/asm-generic/numa.h b/include/asm-generic/numa.h index c32e0cf23c90..16073111bffc 100644 --- a/include/asm-generic/numa.h +++ b/include/asm-generic/numa.h @@ -35,7 +35,7 @@ int __init numa_add_memblk(int nodeid, u64 start, u64 end); void __init numa_set_distance(int from, int to, int distance); void __init numa_free_distance(void); void __init early_map_cpu_to_node(unsigned int cpu, int nid); -int __init early_cpu_to_node(int cpu); +int early_cpu_to_node(int cpu); void numa_store_cpu_info(unsigned int cpu); void numa_add_cpu(unsigned int cpu); void numa_remove_cpu(unsigned int cpu);