[PATCH] procfs: consolidate arch_report_meminfo declaration

Alexander Gordeev agordeev at linux.ibm.com
Wed May 17 23:15:17 AEST 2023


On Tue, May 16, 2023 at 09:57:29PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd at arndb.de>
> 
> 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 at arndb.de>
> ---
>  arch/parisc/include/asm/pgtable.h    | 3 ---
>  arch/powerpc/include/asm/pgtable.h   | 3 ---
>  arch/s390/include/asm/pgtable.h      | 3 ---
>  arch/s390/mm/pageattr.c              | 1 +
>  arch/x86/include/asm/pgtable.h       | 1 +
>  arch/x86/include/asm/pgtable_types.h | 3 ---
>  arch/x86/mm/pat/set_memory.c         | 1 +
>  include/linux/proc_fs.h              | 2 ++
>  8 files changed, 5 insertions(+), 12 deletions(-)
...
> diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
> index 6822a11c2c8a..c55f3c3365af 100644
> --- a/arch/s390/include/asm/pgtable.h
> +++ b/arch/s390/include/asm/pgtable.h
> @@ -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.
> diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c
> index 5ba3bd8a7b12..ca5a418c58a8 100644
> --- a/arch/s390/mm/pageattr.c
> +++ b/arch/s390/mm/pageattr.c
> @@ -4,6 +4,7 @@
>   * Author(s): Jan Glauber <jang at 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>

For s390:

Reviewed-by: Alexander Gordeev <agordeev at linux.ibm.com>


More information about the Linuxppc-dev mailing list