Commit ef104443 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Christian Brauner
Browse files

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: default avatarArnd 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: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
Message-Id: <20230516195834.551901-1-arnd@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 247c8d2f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -472,9 +472,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,

#define pte_same(A,B)	(pte_val(A) == pte_val(B))

struct seq_file;
extern void arch_report_meminfo(struct seq_file *m);

#endif /* !__ASSEMBLY__ */


+0 −3
Original line number Diff line number Diff line
@@ -165,9 +165,6 @@ static inline bool is_ioremap_addr(const void *x)

	return addr >= IOREMAP_BASE && addr < IOREMAP_END;
}

struct seq_file;
void arch_report_meminfo(struct seq_file *m);
#endif /* CONFIG_PPC64 */

#endif /* __ASSEMBLY__ */
+0 −3
Original line number Diff line number Diff line
@@ -42,9 +42,6 @@ static inline void update_page_count(int level, long count)
		atomic_long_add(count, &direct_pages_count[level]);
}

struct seq_file;
void arch_report_meminfo(struct seq_file *m);

/*
 * The S390 doesn't have any external MMU info: the kernel page
 * tables contain all the necessary information.
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
 * Author(s): Jan Glauber <jang@linux.vnet.ibm.com>
 */
#include <linux/hugetlb.h>
#include <linux/proc_fs.h>
#include <linux/vmalloc.h>
#include <linux/mm.h>
#include <asm/cacheflush.h>
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
extern pgd_t early_top_pgt[PTRS_PER_PGD];
bool __init __early_make_pgtable(unsigned long address, pmdval_t pmd);

struct seq_file;
void ptdump_walk_pgd_level(struct seq_file *m, struct mm_struct *mm);
void ptdump_walk_pgd_level_debugfs(struct seq_file *m, struct mm_struct *mm,
				   bool user);
Loading