Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jisheng Zhang and committed by
Catalin Marinas
a7dcf58a cccb78ce

+6 -6
+1 -1
arch/arm64/include/asm/ptdump.h
··· 23 23 24 24 void ptdump_walk(struct seq_file *s, struct ptdump_info *info); 25 25 #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); 27 27 #else 28 28 static inline void ptdump_debugfs_register(struct ptdump_info *info, 29 29 const char *name) { }
+2 -2
arch/arm64/kernel/vdso.c
··· 86 86 return 0; 87 87 } 88 88 89 - static int __vdso_init(enum vdso_abi abi) 89 + static int __init __vdso_init(enum vdso_abi abi) 90 90 { 91 91 int i; 92 92 struct page **vdso_pagelist; ··· 326 326 return 0; 327 327 } 328 328 329 - static int __aarch32_alloc_vdso_pages(void) 329 + static int __init __aarch32_alloc_vdso_pages(void) 330 330 { 331 331 332 332 if (!IS_ENABLED(CONFIG_COMPAT_VDSO))
+2 -2
arch/arm64/mm/ptdump.c
··· 337 337 ptdump_walk_pgd(&st.ptdump, info->mm, NULL); 338 338 } 339 339 340 - static void ptdump_initialize(void) 340 + static void __init ptdump_initialize(void) 341 341 { 342 342 unsigned i, j; 343 343 ··· 381 381 pr_info("Checked W+X mappings: passed, no W+X pages found\n"); 382 382 } 383 383 384 - static int ptdump_init(void) 384 + static int __init ptdump_init(void) 385 385 { 386 386 address_markers[PAGE_END_NR].start_address = PAGE_END; 387 387 #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
+1 -1
arch/arm64/mm/ptdump_debugfs.c
··· 16 16 } 17 17 DEFINE_SHOW_ATTRIBUTE(ptdump); 18 18 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) 20 20 { 21 21 debugfs_create_file(name, 0400, NULL, info, &ptdump_fops); 22 22 }