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

procfs: consolidate arch_report_meminfo declaration

The arch_report_meminfo() function is provided by four architectures,
with a __weak fallback in procfs itself. On architectures that don't
have a custom version, the __weak version causes a warning because
of the missing prototype.

Remove the architecture specific prototypes and instead add one
in linux/proc_fs.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com> # for arch/x86
Acked-by: Helge Deller <deller@gmx.de> # parisc
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Message-Id: <20230516195834.551901-1-arnd@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Arnd Bergmann and committed by
Christian Brauner
ef104443 247c8d2f

+5 -12
-3
arch/parisc/include/asm/pgtable.h
··· 472 472 473 473 #define pte_same(A,B) (pte_val(A) == pte_val(B)) 474 474 475 - struct seq_file; 476 - extern void arch_report_meminfo(struct seq_file *m); 477 - 478 475 #endif /* !__ASSEMBLY__ */ 479 476 480 477
-3
arch/powerpc/include/asm/pgtable.h
··· 165 165 166 166 return addr >= IOREMAP_BASE && addr < IOREMAP_END; 167 167 } 168 - 169 - struct seq_file; 170 - void arch_report_meminfo(struct seq_file *m); 171 168 #endif /* CONFIG_PPC64 */ 172 169 173 170 #endif /* __ASSEMBLY__ */
-3
arch/s390/include/asm/pgtable.h
··· 42 42 atomic_long_add(count, &direct_pages_count[level]); 43 43 } 44 44 45 - struct seq_file; 46 - void arch_report_meminfo(struct seq_file *m); 47 - 48 45 /* 49 46 * The S390 doesn't have any external MMU info: the kernel page 50 47 * tables contain all the necessary information.
+1
arch/s390/mm/pageattr.c
··· 4 4 * Author(s): Jan Glauber <jang@linux.vnet.ibm.com> 5 5 */ 6 6 #include <linux/hugetlb.h> 7 + #include <linux/proc_fs.h> 7 8 #include <linux/vmalloc.h> 8 9 #include <linux/mm.h> 9 10 #include <asm/cacheflush.h>
+1
arch/x86/include/asm/pgtable.h
··· 27 27 extern pgd_t early_top_pgt[PTRS_PER_PGD]; 28 28 bool __init __early_make_pgtable(unsigned long address, pmdval_t pmd); 29 29 30 + struct seq_file; 30 31 void ptdump_walk_pgd_level(struct seq_file *m, struct mm_struct *mm); 31 32 void ptdump_walk_pgd_level_debugfs(struct seq_file *m, struct mm_struct *mm, 32 33 bool user);
-3
arch/x86/include/asm/pgtable_types.h
··· 513 513 #define native_pagetable_init paging_init 514 514 #endif 515 515 516 - struct seq_file; 517 - extern void arch_report_meminfo(struct seq_file *m); 518 - 519 516 enum pg_level { 520 517 PG_LEVEL_NONE, 521 518 PG_LEVEL_4K,
+1
arch/x86/mm/pat/set_memory.c
··· 9 9 #include <linux/mm.h> 10 10 #include <linux/interrupt.h> 11 11 #include <linux/seq_file.h> 12 + #include <linux/proc_fs.h> 12 13 #include <linux/debugfs.h> 13 14 #include <linux/pfn.h> 14 15 #include <linux/percpu.h>
+2
include/linux/proc_fs.h
··· 158 158 struct pid *pid, struct task_struct *task); 159 159 #endif /* CONFIG_PROC_PID_ARCH_STATUS */ 160 160 161 + void arch_report_meminfo(struct seq_file *m); 162 + 161 163 #else /* CONFIG_PROC_FS */ 162 164 163 165 static inline void proc_root_init(void)