All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] arm64: Add __init section marker to some functions
@ 2021-03-30  5:54 ` Jisheng Zhang
  0 siblings, 0 replies; 6+ messages in thread
From: Jisheng Zhang @ 2021-03-30  5:54 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel, linux-kernel

They are not needed after booting, so mark them as __init to move them
to the .init section.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
Since v1:
 - add __init section mark to __vdso_init() and __aarch32_alloc_vdso_pages()

 arch/arm64/include/asm/ptdump.h | 2 +-
 arch/arm64/kernel/vdso.c        | 4 ++--
 arch/arm64/mm/ptdump.c          | 4 ++--
 arch/arm64/mm/ptdump_debugfs.c  | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/include/asm/ptdump.h
index 38187f74e089..b1dd7ecff7ef 100644
--- a/arch/arm64/include/asm/ptdump.h
+++ b/arch/arm64/include/asm/ptdump.h
@@ -23,7 +23,7 @@ struct ptdump_info {
 
 void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
 #ifdef CONFIG_PTDUMP_DEBUGFS
-void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
+void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
 #else
 static inline void ptdump_debugfs_register(struct ptdump_info *info,
 					   const char *name) { }
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index cee5d04ea9ad..d1fa288518a7 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
 	return 0;
 }
 
-static int __vdso_init(enum vdso_abi abi)
+static int __init __vdso_init(enum vdso_abi abi)
 {
 	int i;
 	struct page **vdso_pagelist;
@@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void)
 	return 0;
 }
 
-static int __aarch32_alloc_vdso_pages(void)
+static int __init __aarch32_alloc_vdso_pages(void)
 {
 
 	if (!IS_ENABLED(CONFIG_COMPAT_VDSO))
diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
index 0e050d76b83a..a50e92ea1878 100644
--- a/arch/arm64/mm/ptdump.c
+++ b/arch/arm64/mm/ptdump.c
@@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)
 	ptdump_walk_pgd(&st.ptdump, info->mm, NULL);
 }
 
-static void ptdump_initialize(void)
+static void __init ptdump_initialize(void)
 {
 	unsigned i, j;
 
@@ -381,7 +381,7 @@ void ptdump_check_wx(void)
 		pr_info("Checked W+X mappings: passed, no W+X pages found\n");
 }
 
-static int ptdump_init(void)
+static int __init ptdump_init(void)
 {
 	address_markers[PAGE_END_NR].start_address = PAGE_END;
 #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
diff --git a/arch/arm64/mm/ptdump_debugfs.c b/arch/arm64/mm/ptdump_debugfs.c
index d29d722ec3ec..68bf1a125502 100644
--- a/arch/arm64/mm/ptdump_debugfs.c
+++ b/arch/arm64/mm/ptdump_debugfs.c
@@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v)
 }
 DEFINE_SHOW_ATTRIBUTE(ptdump);
 
-void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
+void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
 {
 	debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
 }
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] arm64: Add __init section marker to some functions
@ 2021-03-30  5:54 ` Jisheng Zhang
  0 siblings, 0 replies; 6+ messages in thread
From: Jisheng Zhang @ 2021-03-30  5:54 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: linux-arm-kernel, linux-kernel

They are not needed after booting, so mark them as __init to move them
to the .init section.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
Since v1:
 - add __init section mark to __vdso_init() and __aarch32_alloc_vdso_pages()

 arch/arm64/include/asm/ptdump.h | 2 +-
 arch/arm64/kernel/vdso.c        | 4 ++--
 arch/arm64/mm/ptdump.c          | 4 ++--
 arch/arm64/mm/ptdump_debugfs.c  | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/include/asm/ptdump.h
index 38187f74e089..b1dd7ecff7ef 100644
--- a/arch/arm64/include/asm/ptdump.h
+++ b/arch/arm64/include/asm/ptdump.h
@@ -23,7 +23,7 @@ struct ptdump_info {
 
 void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
 #ifdef CONFIG_PTDUMP_DEBUGFS
-void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
+void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
 #else
 static inline void ptdump_debugfs_register(struct ptdump_info *info,
 					   const char *name) { }
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index cee5d04ea9ad..d1fa288518a7 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
 	return 0;
 }
 
-static int __vdso_init(enum vdso_abi abi)
+static int __init __vdso_init(enum vdso_abi abi)
 {
 	int i;
 	struct page **vdso_pagelist;
@@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void)
 	return 0;
 }
 
-static int __aarch32_alloc_vdso_pages(void)
+static int __init __aarch32_alloc_vdso_pages(void)
 {
 
 	if (!IS_ENABLED(CONFIG_COMPAT_VDSO))
diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
index 0e050d76b83a..a50e92ea1878 100644
--- a/arch/arm64/mm/ptdump.c
+++ b/arch/arm64/mm/ptdump.c
@@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)
 	ptdump_walk_pgd(&st.ptdump, info->mm, NULL);
 }
 
-static void ptdump_initialize(void)
+static void __init ptdump_initialize(void)
 {
 	unsigned i, j;
 
@@ -381,7 +381,7 @@ void ptdump_check_wx(void)
 		pr_info("Checked W+X mappings: passed, no W+X pages found\n");
 }
 
-static int ptdump_init(void)
+static int __init ptdump_init(void)
 {
 	address_markers[PAGE_END_NR].start_address = PAGE_END;
 #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
diff --git a/arch/arm64/mm/ptdump_debugfs.c b/arch/arm64/mm/ptdump_debugfs.c
index d29d722ec3ec..68bf1a125502 100644
--- a/arch/arm64/mm/ptdump_debugfs.c
+++ b/arch/arm64/mm/ptdump_debugfs.c
@@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v)
 }
 DEFINE_SHOW_ATTRIBUTE(ptdump);
 
-void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
+void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
 {
 	debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
 }
-- 
2.31.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm64: Add __init section marker to some functions
  2021-03-30  5:54 ` Jisheng Zhang
@ 2021-04-07 13:48   ` Steven Price
  -1 siblings, 0 replies; 6+ messages in thread
From: Steven Price @ 2021-04-07 13:48 UTC (permalink / raw)
  To: Jisheng Zhang, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, linux-kernel

On 30/03/2021 06:54, Jisheng Zhang wrote:
> They are not needed after booting, so mark them as __init to move them
> to the .init section.
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
> Since v1:
>   - add __init section mark to __vdso_init() and __aarch32_alloc_vdso_pages()
> 
>   arch/arm64/include/asm/ptdump.h | 2 +-
>   arch/arm64/kernel/vdso.c        | 4 ++--
>   arch/arm64/mm/ptdump.c          | 4 ++--
>   arch/arm64/mm/ptdump_debugfs.c  | 2 +-
>   4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/include/asm/ptdump.h
> index 38187f74e089..b1dd7ecff7ef 100644
> --- a/arch/arm64/include/asm/ptdump.h
> +++ b/arch/arm64/include/asm/ptdump.h
> @@ -23,7 +23,7 @@ struct ptdump_info {
>   
>   void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
>   #ifdef CONFIG_PTDUMP_DEBUGFS
> -void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
> +void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
>   #else
>   static inline void ptdump_debugfs_register(struct ptdump_info *info,
>   					   const char *name) { }
> diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
> index cee5d04ea9ad..d1fa288518a7 100644
> --- a/arch/arm64/kernel/vdso.c
> +++ b/arch/arm64/kernel/vdso.c
> @@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
>   	return 0;
>   }
>   
> -static int __vdso_init(enum vdso_abi abi)
> +static int __init __vdso_init(enum vdso_abi abi)
>   {
>   	int i;
>   	struct page **vdso_pagelist;
> @@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void)
>   	return 0;
>   }
>   
> -static int __aarch32_alloc_vdso_pages(void)
> +static int __init __aarch32_alloc_vdso_pages(void)
>   {
>   
>   	if (!IS_ENABLED(CONFIG_COMPAT_VDSO))
> diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
> index 0e050d76b83a..a50e92ea1878 100644
> --- a/arch/arm64/mm/ptdump.c
> +++ b/arch/arm64/mm/ptdump.c
> @@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)
>   	ptdump_walk_pgd(&st.ptdump, info->mm, NULL);
>   }
>   
> -static void ptdump_initialize(void)
> +static void __init ptdump_initialize(void)
>   {
>   	unsigned i, j;
>   
> @@ -381,7 +381,7 @@ void ptdump_check_wx(void)
>   		pr_info("Checked W+X mappings: passed, no W+X pages found\n");
>   }
>   
> -static int ptdump_init(void)
> +static int __init ptdump_init(void)
>   {
>   	address_markers[PAGE_END_NR].start_address = PAGE_END;
>   #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
> diff --git a/arch/arm64/mm/ptdump_debugfs.c b/arch/arm64/mm/ptdump_debugfs.c
> index d29d722ec3ec..68bf1a125502 100644
> --- a/arch/arm64/mm/ptdump_debugfs.c
> +++ b/arch/arm64/mm/ptdump_debugfs.c
> @@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v)
>   }
>   DEFINE_SHOW_ATTRIBUTE(ptdump);
>   
> -void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
> +void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
>   {
>   	debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
>   }
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm64: Add __init section marker to some functions
@ 2021-04-07 13:48   ` Steven Price
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Price @ 2021-04-07 13:48 UTC (permalink / raw)
  To: Jisheng Zhang, Catalin Marinas, Will Deacon
  Cc: linux-arm-kernel, linux-kernel

On 30/03/2021 06:54, Jisheng Zhang wrote:
> They are not needed after booting, so mark them as __init to move them
> to the .init section.
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
> Since v1:
>   - add __init section mark to __vdso_init() and __aarch32_alloc_vdso_pages()
> 
>   arch/arm64/include/asm/ptdump.h | 2 +-
>   arch/arm64/kernel/vdso.c        | 4 ++--
>   arch/arm64/mm/ptdump.c          | 4 ++--
>   arch/arm64/mm/ptdump_debugfs.c  | 2 +-
>   4 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/include/asm/ptdump.h
> index 38187f74e089..b1dd7ecff7ef 100644
> --- a/arch/arm64/include/asm/ptdump.h
> +++ b/arch/arm64/include/asm/ptdump.h
> @@ -23,7 +23,7 @@ struct ptdump_info {
>   
>   void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
>   #ifdef CONFIG_PTDUMP_DEBUGFS
> -void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
> +void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
>   #else
>   static inline void ptdump_debugfs_register(struct ptdump_info *info,
>   					   const char *name) { }
> diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
> index cee5d04ea9ad..d1fa288518a7 100644
> --- a/arch/arm64/kernel/vdso.c
> +++ b/arch/arm64/kernel/vdso.c
> @@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
>   	return 0;
>   }
>   
> -static int __vdso_init(enum vdso_abi abi)
> +static int __init __vdso_init(enum vdso_abi abi)
>   {
>   	int i;
>   	struct page **vdso_pagelist;
> @@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void)
>   	return 0;
>   }
>   
> -static int __aarch32_alloc_vdso_pages(void)
> +static int __init __aarch32_alloc_vdso_pages(void)
>   {
>   
>   	if (!IS_ENABLED(CONFIG_COMPAT_VDSO))
> diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c
> index 0e050d76b83a..a50e92ea1878 100644
> --- a/arch/arm64/mm/ptdump.c
> +++ b/arch/arm64/mm/ptdump.c
> @@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)
>   	ptdump_walk_pgd(&st.ptdump, info->mm, NULL);
>   }
>   
> -static void ptdump_initialize(void)
> +static void __init ptdump_initialize(void)
>   {
>   	unsigned i, j;
>   
> @@ -381,7 +381,7 @@ void ptdump_check_wx(void)
>   		pr_info("Checked W+X mappings: passed, no W+X pages found\n");
>   }
>   
> -static int ptdump_init(void)
> +static int __init ptdump_init(void)
>   {
>   	address_markers[PAGE_END_NR].start_address = PAGE_END;
>   #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
> diff --git a/arch/arm64/mm/ptdump_debugfs.c b/arch/arm64/mm/ptdump_debugfs.c
> index d29d722ec3ec..68bf1a125502 100644
> --- a/arch/arm64/mm/ptdump_debugfs.c
> +++ b/arch/arm64/mm/ptdump_debugfs.c
> @@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v)
>   }
>   DEFINE_SHOW_ATTRIBUTE(ptdump);
>   
> -void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
> +void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
>   {
>   	debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
>   }
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm64: Add __init section marker to some functions
  2021-03-30  5:54 ` Jisheng Zhang
@ 2021-04-08 18:00   ` Catalin Marinas
  -1 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2021-04-08 18:00 UTC (permalink / raw)
  To: Will Deacon, Jisheng Zhang; +Cc: linux-arm-kernel, linux-kernel

On Tue, 30 Mar 2021 13:54:49 +0800, Jisheng Zhang wrote:
> They are not needed after booting, so mark them as __init to move them
> to the .init section.

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: Add __init section marker to some functions
      https://git.kernel.org/arm64/c/a7dcf58ae5d2

-- 
Catalin


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] arm64: Add __init section marker to some functions
@ 2021-04-08 18:00   ` Catalin Marinas
  0 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2021-04-08 18:00 UTC (permalink / raw)
  To: Will Deacon, Jisheng Zhang; +Cc: linux-arm-kernel, linux-kernel

On Tue, 30 Mar 2021 13:54:49 +0800, Jisheng Zhang wrote:
> They are not needed after booting, so mark them as __init to move them
> to the .init section.

Applied to arm64 (for-next/misc), thanks!

[1/1] arm64: Add __init section marker to some functions
      https://git.kernel.org/arm64/c/a7dcf58ae5d2

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-08 18:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  5:54 [PATCH v2] arm64: Add __init section marker to some functions Jisheng Zhang
2021-03-30  5:54 ` Jisheng Zhang
2021-04-07 13:48 ` Steven Price
2021-04-07 13:48   ` Steven Price
2021-04-08 18:00 ` Catalin Marinas
2021-04-08 18:00   ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.