Commit a7dcf58a authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Catalin Marinas

arm64: Add __init section marker to some functions

They are not needed after booting, so mark them as __init to move them
to the .init section.
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20210330135449.4dcffd7f@xhacker.debianSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent cccb78ce
...@@ -23,7 +23,7 @@ struct ptdump_info { ...@@ -23,7 +23,7 @@ struct ptdump_info {
void ptdump_walk(struct seq_file *s, struct ptdump_info *info); void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
#ifdef CONFIG_PTDUMP_DEBUGFS #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 #else
static inline void ptdump_debugfs_register(struct ptdump_info *info, static inline void ptdump_debugfs_register(struct ptdump_info *info,
const char *name) { } const char *name) { }
......
...@@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm, ...@@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
return 0; return 0;
} }
static int __vdso_init(enum vdso_abi abi) static int __init __vdso_init(enum vdso_abi abi)
{ {
int i; int i;
struct page **vdso_pagelist; struct page **vdso_pagelist;
...@@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void) ...@@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void)
return 0; return 0;
} }
static int __aarch32_alloc_vdso_pages(void) static int __init __aarch32_alloc_vdso_pages(void)
{ {
if (!IS_ENABLED(CONFIG_COMPAT_VDSO)) if (!IS_ENABLED(CONFIG_COMPAT_VDSO))
......
...@@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info) ...@@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)
ptdump_walk_pgd(&st.ptdump, info->mm, NULL); ptdump_walk_pgd(&st.ptdump, info->mm, NULL);
} }
static void ptdump_initialize(void) static void __init ptdump_initialize(void)
{ {
unsigned i, j; unsigned i, j;
...@@ -381,7 +381,7 @@ void ptdump_check_wx(void) ...@@ -381,7 +381,7 @@ void ptdump_check_wx(void)
pr_info("Checked W+X mappings: passed, no W+X pages found\n"); 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; address_markers[PAGE_END_NR].start_address = PAGE_END;
#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
......
...@@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v) ...@@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v)
} }
DEFINE_SHOW_ATTRIBUTE(ptdump); 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); debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment