Skip to content

Commit a7dcf58

Browse files
rvoskctmarinas
authored andcommitted
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: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://lore.kernel.org/r/20210330135449.4dcffd7f@xhacker.debian Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent cccb78c commit a7dcf58

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

arch/arm64/include/asm/ptdump.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ struct ptdump_info {
2323

2424
void ptdump_walk(struct seq_file *s, struct ptdump_info *info);
2525
#ifdef CONFIG_PTDUMP_DEBUGFS
26-
void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
26+
void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name);
2727
#else
2828
static inline void ptdump_debugfs_register(struct ptdump_info *info,
2929
const char *name) { }

arch/arm64/kernel/vdso.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm,
8686
return 0;
8787
}
8888

89-
static int __vdso_init(enum vdso_abi abi)
89+
static int __init __vdso_init(enum vdso_abi abi)
9090
{
9191
int i;
9292
struct page **vdso_pagelist;
@@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void)
326326
return 0;
327327
}
328328

329-
static int __aarch32_alloc_vdso_pages(void)
329+
static int __init __aarch32_alloc_vdso_pages(void)
330330
{
331331

332332
if (!IS_ENABLED(CONFIG_COMPAT_VDSO))

arch/arm64/mm/ptdump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info)
337337
ptdump_walk_pgd(&st.ptdump, info->mm, NULL);
338338
}
339339

340-
static void ptdump_initialize(void)
340+
static void __init ptdump_initialize(void)
341341
{
342342
unsigned i, j;
343343

@@ -381,7 +381,7 @@ void ptdump_check_wx(void)
381381
pr_info("Checked W+X mappings: passed, no W+X pages found\n");
382382
}
383383

384-
static int ptdump_init(void)
384+
static int __init ptdump_init(void)
385385
{
386386
address_markers[PAGE_END_NR].start_address = PAGE_END;
387387
#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)

arch/arm64/mm/ptdump_debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v)
1616
}
1717
DEFINE_SHOW_ATTRIBUTE(ptdump);
1818

19-
void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
19+
void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name)
2020
{
2121
debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
2222
}

0 commit comments

Comments
 (0)