From patchwork Sat Jun 3 07:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 102788 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1526321vqr; Sat, 3 Jun 2023 01:03:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6G4OdZaumFOivKvBcpq1vBFI10YH0nI/Txhuw9jtm//fgatcyDhhh9Qn5UgF4yjyncRwZl X-Received: by 2002:a05:6a20:8f29:b0:10f:8528:38b3 with SMTP id b41-20020a056a208f2900b0010f852838b3mr879128pzk.20.1685779426134; Sat, 03 Jun 2023 01:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685779426; cv=none; d=google.com; s=arc-20160816; b=Phm4/sHrq2fjcJiQTj+OKddC894aN3hXJlQZTf5ZD0OVji1M4RAggbTphg5yUwyR9x 3olQP4+V/mJyDmzErEebs5Rqy1CrCTAhkS41R5e2XRQitcqWeacD/kYNEtYiwiKeeyzp x72Ta77hbuQTkJciU5Gt5ZsWgppviLBHgMo4oceyrPHpvpnl3JL+EOnPA2vlYb+iWic6 cZGnrWpZigdr79uvwUVWsGmqh7TasIW+RGuoO1/DHdICCilITc3ZMkvNO1oYVjqtsQB/ Jg/sPCt9MN4GX3GVVCng/MZm+Kml6A5/szTqGb1tXraRBxj+1neJHpcDKFjMlb/Q0pCg 0LKQ== 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 :message-id:date:subject:cc:to:from; bh=+QF4C7kSSiKmOoW0KkA3ie//CjvQYylr48j0ks6YCRg=; b=sSnqej8OZs5/VR25Fwg08mT9vwL+Tr61oEzFT6eDZxZtuD73iNeBXz7Tf3z/GdmdKl GRLnN963Y383H/0Bawch+BvAWN0vWfakwQvRTEdVpu/g0qOlPAdfr3fljypLrSzPhb91 PZAX4alrs4kyN4EqTOL2D6vp3pyPWrj18/yHOs/M/VTmAw1tOSV3+NZwaGUOEOcdqNIP 6nQyOQaYBI8tCzf157TkuvGvfiWc7PW5Nyyowm3nMJSDqXI8GKuKzg2rTfEddawV91/+ 3Kh4EKfOmITF6a0wybyoUiujpbQEFZGQYtQC09O8aZw88PR9lFBSyVBbs9HBJwj7rNzA yvTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v12-20020a63bf0c000000b0052c8234a858si2302594pgf.168.2023.06.03.01.03.33; Sat, 03 Jun 2023 01:03:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231950AbjFCHhC (ORCPT + 99 others); Sat, 3 Jun 2023 03:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjFCHg6 (ORCPT ); Sat, 3 Jun 2023 03:36:58 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88BB51A6 for ; Sat, 3 Jun 2023 00:36:55 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QYBWn2X8mzTkkH; Sat, 3 Jun 2023 15:36:37 +0800 (CST) Received: from huawei.com (10.175.104.170) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 3 Jun 2023 15:36:51 +0800 From: Miaohe Lin To: , , , CC: , , , , , , , Subject: [PATCH] sched/topology: mark set_sched_topology() __init Date: Sat, 3 Jun 2023 15:36:45 +0800 Message-ID: <20230603073645.1173332-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767667847314127761?= X-GMAIL-MSGID: =?utf-8?q?1767667847314127761?= All callers of set_sched_topology() are within __init section. Mark it __init too. Signed-off-by: Miaohe Lin Reviewed-by: Valentin Schneider --- include/linux/sched/topology.h | 2 +- kernel/sched/topology.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h index 816df6cc444e..67b573d5bf28 100644 --- a/include/linux/sched/topology.h +++ b/include/linux/sched/topology.h @@ -203,7 +203,7 @@ struct sched_domain_topology_level { #endif }; -extern void set_sched_topology(struct sched_domain_topology_level *tl); +extern void __init set_sched_topology(struct sched_domain_topology_level *tl); #ifdef CONFIG_SCHED_DEBUG # define SD_INIT_NAME(type) .name = #type diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index ca4472281c28..cb92dc5f5646 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1681,7 +1681,7 @@ static struct sched_domain_topology_level *sched_domain_topology_saved; #define for_each_sd_topology(tl) \ for (tl = sched_domain_topology; tl->mask; tl++) -void set_sched_topology(struct sched_domain_topology_level *tl) +void __init set_sched_topology(struct sched_domain_topology_level *tl) { if (WARN_ON_ONCE(sched_smp_initialized)) return;