diff mbox series

[05/16] mm/page_alloc: add __init annotations to init_mem_debugging_and_hardening()

Message ID 20220909092451.24883-6-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series A few cleanup patches for mm | expand

Commit Message

Miaohe Lin Sept. 9, 2022, 9:24 a.m. UTC
It's only called by mm_init(). Add __init annotations to it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 include/linux/mm.h | 2 +-
 mm/page_alloc.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

David Hildenbrand Sept. 9, 2022, 11:27 a.m. UTC | #1
On 09.09.22 11:24, Miaohe Lin wrote:
> It's only called by mm_init(). Add __init annotations to it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>   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;
>   

Reviewed-by: David Hildenbrand <david@redhat.com>
Anshuman Khandual Sept. 13, 2022, 8:20 a.m. UTC | #2
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 <linmiaohe@huawei.com>

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---
>  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;
>
Oscar Salvador Sept. 15, 2022, 4:49 a.m. UTC | #3
On Fri, Sep 09, 2022 at 05:24:40PM +0800, Miaohe Lin wrote:
> It's only called by mm_init(). Add __init annotations to it.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Oscar Salvador <osalvador@suse.de>
diff mbox series

Patch

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;