From patchwork Thu Oct 12 02:48:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rongwei Wang X-Patchwork-Id: 151668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp945510vqb; Wed, 11 Oct 2023 19:49:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVldtMjDdA8lCEelvoGfrh0wtuQVK0cg7BOEea0R1EvcH1oQJlxkzOnup71V7rTdkhyt8B X-Received: by 2002:a05:6358:c10a:b0:14a:cca4:55d7 with SMTP id fh10-20020a056358c10a00b0014acca455d7mr19184032rwb.3.1697078978346; Wed, 11 Oct 2023 19:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697078978; cv=none; d=google.com; s=arc-20160816; b=mx79K7xeZ6JlZJUNIZN+rXc2abVXve/Wmrur2TeuQFMxfb6D8n69gjgnfpV+170Lyw CLcsP5wsvEqBgRE8R2XDnefSxyRmMc7G95wVPtaU1I4Eyj80IsPOHimuO5Z4R2mjgZSZ Yblv5Br5bwu2bGJ943CwPEPimZaYfBCFl10ppLdPp9Di0UifAkksWHerpScLQn7H4KaY AnntvEOaPMxfiXXKoEg4mtaj3Hrqg7O9XNhiLhxUttNiN+HWnR01CZ8hesG0K8jzKRXB U1AUCXMVkSatW/8+zHcjFd7J2QSxyujcyXU28Q2+VH20NlB/N/qAVfTaePM4i8MShNPu oBnA== 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; bh=JUVnUsb26mlDDBqIiN1AvBz7w4jH9SeFH++N8Ys38o0=; fh=ZYoHe1wlSxRVpYSXw5DcseDzNzuurc0wqkDMPTWnoPk=; b=CrjgbCnl/ugcneFaFkCtNJRZtS6sfU2am9lsgIJkixEO2+MbRXkku72gUsJBWXlxLP PRq2AdZFix1bM+tX/yojaEDnbQ83HYQBcDgFLM37QcFlXtUQHb/+EF4ZQg3k+YJmU3Gt tkxr4CeB+zP/voUhm6Erb7GNfl91bBJelvwjQjN8wmNdxIr9UzJLQZbYeFgV86zWQYH3 phRFuEPzmU6NNAbefbQNRuX6zdUmUFQXX6s89lfZUPg7Hg8zNB14+CjpGy5JoaCaX3Sv eq0Mkjx8gDaEnXR9MOi3VelfECzpi0gB3+SnhKeLXuf0pgrODq6bfU2CRIZChGvv9E1k 8+Yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id cp11-20020a056a00348b00b0069353ac3d3csi13065665pfb.72.2023.10.11.19.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 19:49:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 76A7B8206D7A; Wed, 11 Oct 2023 19:49:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376932AbjJLCt1 (ORCPT + 18 others); Wed, 11 Oct 2023 22:49:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376775AbjJLCsz (ORCPT ); Wed, 11 Oct 2023 22:48:55 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F78B6 for ; Wed, 11 Oct 2023 19:48:53 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R561e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0VtykMgi_1697078930; Received: from localhost.localdomain(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0VtykMgi_1697078930) by smtp.aliyun-inc.com; Thu, 12 Oct 2023 10:48:51 +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, willy@infradead.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, tj@kernel.org, mingo@redhat.com Subject: [PATCH RFC 3/5] arch_numa: remove __init in early_cpu_to_node() Date: Thu, 12 Oct 2023 10:48:40 +0800 Message-Id: <20231012024842.99703-4-rongwei.wang@linux.alibaba.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20231012024842.99703-1-rongwei.wang@linux.alibaba.com> References: <20231012024842.99703-1-rongwei.wang@linux.alibaba.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 11 Oct 2023 19:49:37 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779516286569671018 X-GMAIL-MSGID: 1779516286569671018 Most of arch does not stick '__init' for early_cpu_to_node(). And it's safe to delete this attribute here, ready for later numa emulation. Signed-off-by: Rongwei Wang --- drivers/base/arch_numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index db0bb8b8fd67..5df0ad5cb09d 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); -static int __init early_cpu_to_node(unsigned int cpu) +int early_cpu_to_node(unsigned int cpu) { return cpu_to_node_map[cpu]; }