Files
android_kernel_xiaomi_sm8450/arch/powerpc/include/asm
Michael Ellerman 9d06c199d8 powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()
[ Upstream commit d8c3f243d4db24675b653f0568bb65dae34e6455 ]

With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with:

  arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes]
  1739 | unsigned long __init arch_reserved_kernel_pages(void)
       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

The prototype for arch_reserved_kernel_pages() is in include/linux/mm.h,
but it's guarded by __HAVE_ARCH_RESERVED_KERNEL_PAGES. The powerpc
headers define __HAVE_ARCH_RESERVED_KERNEL_PAGES in asm/mmzone.h, which
is not included into the generic headers when NUMA=n.

Move the definition of __HAVE_ARCH_RESERVED_KERNEL_PAGES into asm/mmu.h
which is included regardless of NUMA=n.

Additionally the ifdef around __HAVE_ARCH_RESERVED_KERNEL_PAGES needs to
also check for CONFIG_PRESERVE_FA_DUMP.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231130114433.3053544-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-23 08:42:02 +01:00
..
2019-11-18 22:27:51 +11:00
2020-05-28 23:24:36 +10:00
2020-10-08 12:50:52 +11:00
2020-10-07 22:34:47 +11:00
2020-07-27 14:29:23 -04:00
2020-05-28 23:24:36 +10:00
2020-07-23 17:41:36 +10:00
2020-10-06 07:07:03 +02:00
2018-05-25 12:04:43 +10:00
2024-01-25 14:37:39 -08:00
2021-05-14 09:50:39 +02:00
2020-07-27 00:01:32 +10:00
2020-07-23 17:43:44 +10:00
2018-07-30 22:48:21 +10:00
2019-05-01 16:45:05 +10:00