ARM: 9073/1: ptdump: add __init section marker to three functions
authorJisheng Zhang (syna) <Jisheng.Zhang@synaptics.com>
Mon, 12 Apr 2021 08:12:36 +0000 (09:12 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Sun, 18 Apr 2021 18:15:12 +0000 (19:15 +0100)
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>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/mm/dump.c
arch/arm/mm/ptdump_debugfs.c

index 93ff0097f00bb878698f389ae0af0511099dc36d..fb688003d156ea8a9c77fba4ae9d080d3be80b42 100644 (file)
@@ -420,7 +420,7 @@ void ptdump_walk_pgd(struct seq_file *m, struct ptdump_info *info)
        note_page(&st, 0, 0, 0, NULL);
 }
 
-static void ptdump_initialize(void)
+static void __init ptdump_initialize(void)
 {
        unsigned i, j;
 
@@ -466,7 +466,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)
 {
        ptdump_initialize();
        ptdump_debugfs_register(&kernel_ptdump_info, "kernel_page_tables");
index 598b636615a29ac5aba506242aa1119418b4d52d..8df9afac8d812bfc84d52a4d05683005317a7328 100644 (file)
@@ -24,7 +24,7 @@ static const struct file_operations ptdump_fops = {
        .release        = single_release,
 };
 
-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);
 }