Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1701427rwn; Fri, 9 Sep 2022 02:42:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5TVMmqQGf+mr1CZgLar13SqDeqwbRhhDFK3dl1u00BHzgoNUoXyYWTB4Vf5Oh7KRU6E6q8 X-Received: by 2002:a05:6512:33d1:b0:494:6876:8a01 with SMTP id d17-20020a05651233d100b0049468768a01mr3857091lfg.252.1662716564737; Fri, 09 Sep 2022 02:42:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662716564; cv=none; d=google.com; s=arc-20160816; b=tY8iu+fNTYYMYldJKgDHHHCTDQTfUnnguTcJeVKL7Ei9zAZEeY6L5RtKryw2I0+UL0 eTlAnsKY04pf/Ww4tH8MSHkT1oeRDaGncMYrrE1bC8r1CxZlWqc3Um+7RMsrg41xu5Ah BUj7wWpdiwDd6pYtSc8kFB6xSYjyUciGy05OixWf4Uw138gErM0is60btRek43W/pLUj SQzRhgxUFY1c2vp1j4xzJRUb25etjHGN6l2GMUapGoUSj23t506owsgRy/2SVDZAOaux S0P+DnxvhPg9lJaoRNB7zCiIiEhiQlYwaWnUt6P9O4YY05Uofyf5fdv3vwRM1S3JMyXw +lqg== 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=BsdEgiIXH29TQyM4Lux2WCwNCt4hpS8ehaWLbizfKEY=; b=sdl3Rebf/qNbF0R9sBDxadzvUWGGNkPqqsVBoDGaoA2Ca/6RU/5XxOfi6n/OT9dkE6 UttlyvonejIfEB61zHPelDsmQdHepNIp6ZRsygY7YVoD9GQRGqiJCzVdrdnR/gGr4dF7 Qf3eH6SGlzyK6ryUwd/B2HuiRTSTuF3P/hYslLKWFvvyNIy3ZtIS4BTOZ69tfHqKceZu HuSAsaGAKkpXumdxl0hhGxqgadKmKZt3hO9IGym5/3MgkB8jBJz9JYOvFyDCoxIvluj1 LbPlH/i0rkejxSxc9XVOzUX+ywaCtG0Pa5yiewwLH284VVbC0idCXZCLu5uRoKEx74fP fRzQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx35-20020a05651c19a300b0026436b80feesi28655ljb.426.2022.09.09.02.42.14; Fri, 09 Sep 2022 02:42:44 -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 S229639AbiIIJ1v (ORCPT + 99 others); Fri, 9 Sep 2022 05:27:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbiIIJ05 (ORCPT ); Fri, 9 Sep 2022 05:26:57 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECDC5956B3 for ; Fri, 9 Sep 2022 02:25:30 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MP9Wb5xM9znVBC; Fri, 9 Sep 2022 17:22:51 +0800 (CST) Received: from huawei.com (10.175.124.27) 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.2375.24; Fri, 9 Sep 2022 17:25:27 +0800 From: Miaohe Lin To: CC: , , , , Subject: [PATCH 05/16] mm/page_alloc: add __init annotations to init_mem_debugging_and_hardening() Date: Fri, 9 Sep 2022 17:24:40 +0800 Message-ID: <20220909092451.24883-6-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220909092451.24883-1-linmiaohe@huawei.com> References: <20220909092451.24883-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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 It's only called by mm_init(). Add __init annotations to it. Signed-off-by: Miaohe Lin --- include/linux/mm.h | 2 +- mm/page_alloc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 364bcadb4d20..c2277f5aba9e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3093,7 +3093,7 @@ extern int apply_to_existing_page_range(struct mm_struct *mm, unsigned long address, unsigned long size, pte_fn_t fn, void *data); -extern void init_mem_debugging_and_hardening(void); +extern void __init init_mem_debugging_and_hardening(void); #ifdef CONFIG_PAGE_POISONING extern void __kernel_poison_pages(struct page *page, int numpages); extern void __kernel_unpoison_pages(struct page *page, int numpages); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c81f06d8a4f5..3497919f4ef5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -903,7 +903,7 @@ static inline void clear_page_guard(struct zone *zone, struct page *page, * order of appearance. So we need to first gather the full picture of what was * enabled, and then make decisions. */ -void init_mem_debugging_and_hardening(void) +void __init init_mem_debugging_and_hardening(void) { bool page_poisoning_requested = false; -- 2.23.0