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: 203564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp336527dyc; Tue, 20 Feb 2024 03:37:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXzEG3FiXwGWsWxCLjQB9mkJ0PJ6skmv/k+PawrEg6nMBiSwq2ajg1gSZnOlb3/DVH2KCV9NKwD/OeKcUDHuBMDg9AEtQ== X-Google-Smtp-Source: AGHT+IGNe6Zdoxi5992CNiCNz1iEyMMGGCkDS6nvW39Po/ApkwsSV5RDGbSheaKfTZ32gP1to8q4 X-Received: by 2002:a1f:4ac5:0:b0:4c0:37a4:dbbd with SMTP id x188-20020a1f4ac5000000b004c037a4dbbdmr9739871vka.13.1708429039119; Tue, 20 Feb 2024 03:37:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708429039; cv=pass; d=google.com; s=arc-20160816; b=xyut+plZqbS8O1dxzcKfDp+Ee9EkBxKKLm+MiPyU4cCYjf5WrWFv8tNFuAjsQ+Mq6V 0mtzKV9MS2bnu5K16hFAocjnySA64zqqP9eeTOrIcsGiqFwNJoT49G9gG4RkjRIamfTV djNmWzsXqgH/LCNXT/9THYrAZMkRxsaDJhGJ3prs3rr5ox2GDIXAU0ikQWRrhXrXhkA9 j89UWHDWUX1W4i7+KU78YFMeBZFW61/a5JtsunWF7YRim88O5aW4SBKGYOAVjt5AnDCL 6W6VmRfmtJ5Q0dBHA6cuFMEsNY9zL3TxotAAsv+6+KJpcHstWFKZRft1I7inJ86DqmIA dSnQ== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72918-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c16-20020a0ce7d0000000b0068f629b5294si4681096qvo.162.2024.02.20.03.37.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 03:37:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72918-ouuuleilei=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=@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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72918-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E50B81C233AA for ; Tue, 20 Feb 2024 11:37:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2BE667C74; Tue, 20 Feb 2024 11:36:55 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791417688542770604 X-GMAIL-MSGID: 1791417688542770604 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);