Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1670371rdb; Tue, 20 Feb 2024 03:37:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX2SZ46oiiQMsF4VqWCy/SDX6kCvnnoI6cNBcfbLU/qLWQsvQfLDpJ/Mj0PRKpAU19Zu7leMzO/y+FYnPRIOb1izAddTp2K5FEdXOAjEw== X-Google-Smtp-Source: AGHT+IEoutoafp3CzlAhIZ6xWqEyWb/ogoxCBRmxGmEINFGUsJ+ONNTXAL3iq5Nf8VWosMi/aiWl X-Received: by 2002:a17:906:55cb:b0:a3e:c1ef:e1bd with SMTP id z11-20020a17090655cb00b00a3ec1efe1bdmr3943709ejp.16.1708429028827; Tue, 20 Feb 2024 03:37:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708429028; cv=pass; d=google.com; s=arc-20160816; b=xZH/oT2PJ7fifn3Uso6Y4V2h+MjFfWl4klHoe8OmIjMOoZWeN7ZE26TjsW5M1nDJnL erYwUyp7fe5YWtwbQm+izkfxJhCysahUnUaZxaryW3ECOgf5m9u66lT0LZodECGsyp2p ijWPlz7hOVJALhsrAXQ3uedfxm25IiGgIxoxFIwss8/fXfuGgzKoywfMfQjKzpTAciMm Z1AKsEgJy8nZ9gPXam+kM8Rhc/0Amc/XgucYH7DBxqEXZoZqsU5/k9PH67/h85SUcuJT RFatgsE+1TGFuwPlwwQ4DC9RZGjGrIhY5itiv0keDA465DD/3uMjizGptLrkf6kOjz5Z 5+fg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RBOoxvuwLWFkRyLKl1klmLDhYCLGEFN4RBXhRrClOKs=; fh=o8qbs+v8PQXZY7Rz5Tt44JiJmivRr7M1OVX0XPMkEng=; b=nyn+veSeoligFk2e+s6KCYLpFkXp170EO4Uvi7p61POox1So+IJ6O+R2I3qefc+zKi jl+sRLDCSr5UzR1ngZltp6A6yzW8Z1H+KmBoykz1C8c2/WmEuxb1mwG9vCVl6maYtWEp MgJfyLjGYJAeICao6tfCHxdEORAqLTipTYb0VKEd3zPND2IBqrabymuHBEsFZ2t+gklj E8MOBECR5vYzqyO32cFL0/KRRrpcugCaXwMHhcyMr9LXpAbFT6rCHuJMFgOZbaixF+Es DHuJyYUsMwhW+MBfaUgrBarmlywt5PTSeDs+TRC21lhcCUk0m9gqVZsfc/ivl2oakRlv njkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b="N/0phye1"; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-72918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72918-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ox25-20020a170907101900b00a3e6b8363e1si2351178ejb.533.2024.02.20.03.37.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 03:37:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72918-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=@linux.alibaba.com header.s=default header.b="N/0phye1"; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-72918-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72918-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.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 05F571F21FE3 for ; Tue, 20 Feb 2024 11:37:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5F6C67C49; Tue, 20 Feb 2024 11:36:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="N/0phye1" Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 C932567754 for ; Tue, 20 Feb 2024 11:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708429013; cv=none; b=ZkGRQ0qxaQPnJKsnCVAeMsQoURJxXntiDg9uMDESYsg4lk3oVZpGA856IOea1x9ljBoG8SfbmKU9MXTPShEzc1w0ZZX69yiVjr/XnU+c12M03ZRXak/J/8jKOt2oamY2prNECSQyLeHyeYdl0Cbym4rfr0OoKUfCikPdvZ76Y7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708429013; c=relaxed/simple; bh=Rie2nYgu8JzBJQRtAAIUzOuOpCt4K1gxCq29ozAESw8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JJVZegFr1RkvN7RZw8inR+8pXQSpJgML/w8tJlSKB5ki7hpxr8X3U+P3r9JbgI2SRLIec3MS+qgpMiF7RM9nHY1RAG9wAMgUYQ2/8iTYcLiNocjG428/yAulgpTw1oOn1Aw26S/1xjUq+O4jCQc2irrZDuF95nf/ny7gMRxjuvA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=N/0phye1; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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); -- 2.32.0.3.gf3a3e56d6