]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mm/page_alloc: add __init annotations to init_mem_debugging_and_hardening()
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 16 Sep 2022 07:22:46 +0000 (15:22 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:28 +0000 (14:03 -0700)
It's only called by mm_init(). Add __init annotations to it.

Link: https://lkml.kernel.org/r/20220916072257.9639-6-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
mm/page_alloc.c

index a37c8a29c49bacb7d72b88b45a7733f98c88aeda..8bbcccbc55654341c4d2b361549e1da4da6d65cb 100644 (file)
@@ -3092,7 +3092,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);
index b94d3a42cb8bf5315ddf3b442d69777cb6cd6f83..21261f55dab1ed833278e8477f1aa65487d71be5 100644 (file)
@@ -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;