Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6299294rwn; Tue, 13 Sep 2022 02:00:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6zCk7F5C+2wmi9lErZT2Eqjn/PhzOUpelKQQUw8nbUTqEqL8JxW4ZrVmcUWy8DH4z9SUjp X-Received: by 2002:a63:5a41:0:b0:430:673e:1e13 with SMTP id k1-20020a635a41000000b00430673e1e13mr27659799pgm.435.1663059643692; Tue, 13 Sep 2022 02:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663059643; cv=none; d=google.com; s=arc-20160816; b=zYYW8w9V2YxOuZMmMpoQlyTOvG8qqD3fn3tkqrsDiPgDRJfvxWJ4n2hLdQKxu1g9WS /UO8IP27l0vI4ZrriM9JUQzSI5eQoOmcpI5w7Ep0jAparGBTsyZW6mENhHwWe9eRbNAz dtgBb6V4KUzLr0aCFqIOd9/GfC2zTD+jsdb+6DnU0LeAZLBAcdRGRl9ffIyLzXh9QAzA H5eBKfe8rH9IQ1l6JU8+BLhLvkuT11y6oP0lvMtEfhcOn6x6WM2rlr6tEGbh5Wg6hzEa al/+AGhff6BCR2yTNxKgWgY6pPz+okrzkgVUBiCeSuMm9yQzhP/3qLDwA/je4gMhIJba 4Awg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=7iI/OTRR5N6d+Xmop+ADo/CgLhha1gXf25/FFZsC/z8=; b=Zj50uyzd7EG8Wm+Y0lixfgFnDQsnsrp7dV+fC3n2lTndot99e0dakCwOUOMA7KDR9f 37hDs6XwPD5gLezSvmTJHr2n0HimVC/Smqd4o+B7OXqe4cKxuqkFI6eYoQ2XuivuPOry pE9eYHqveSmkn3dQ4plAtpNPYOfLExWAr41pdvn5gEeOPwGIfP9gRbcMKZtmcyVoQOan OI7MDpTv/Q4ZBdbFRQYVklYIboKxsmPyruulU2RbzMq8Q5Oswtu6cX+LQFy6soFj2Zkg yKP+ZjQlfTvcfji520Hg+u/l2BQQG8qPbiGDcAe2iOKG3ttWxxm+qAn/ChsLZvbLz4dE FgGw== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a625507000000b00536e9a4928bsi10102444pfb.297.2022.09.13.02.00.31; Tue, 13 Sep 2022 02:00:43 -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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231397AbiIMIVb (ORCPT + 99 others); Tue, 13 Sep 2022 04:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231476AbiIMIVD (ORCPT ); Tue, 13 Sep 2022 04:21:03 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D2D2A5AC56 for ; Tue, 13 Sep 2022 01:20:51 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 08EE0D6E; Tue, 13 Sep 2022 01:20:56 -0700 (PDT) Received: from [10.162.42.9] (unknown [10.162.42.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8B1A83F73B; Tue, 13 Sep 2022 01:20:47 -0700 (PDT) Message-ID: <8f70a514-7ced-9359-d169-ac928578980f@arm.com> Date: Tue, 13 Sep 2022 13:50:45 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH 05/16] mm/page_alloc: add __init annotations to init_mem_debugging_and_hardening() Content-Language: en-US To: Miaohe Lin , akpm@linux-foundation.org Cc: david@redhat.com, osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-6-linmiaohe@huawei.com> From: Anshuman Khandual In-Reply-To: <20220909092451.24883-6-linmiaohe@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 On 9/9/22 14:54, Miaohe Lin wrote: > It's only called by mm_init(). Add __init annotations to it. > > Signed-off-by: Miaohe Lin Reviewed-by: Anshuman Khandual > --- > 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; >