powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Nov 2023 13:19:19 +0000 (00:19 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:14 +0000 (20:14 +0000)
commit2074271ac73cd5f15ba5d9d6b5be7e1b54854c81
treeb553be192f35aa1835bfa895d3b961cdf78dd467
parent82e40455715f9789edb87209d3ff25c23a58c37c
powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping()

[ Upstream commit ede66cd22441820cbd399936bf84fdc4294bc7fa ]

With CONFIG_NUMA=n the build fails with:

  arch/powerpc/mm/book3s64/pgtable.c:275:15: error: no previous prototype for ‘create_section_mapping’ [-Werror=missing-prototypes]
  275 | int __meminit create_section_mapping(unsigned long start, unsigned long end,
      |               ^~~~~~~~~~~~~~~~~~~~~~

That happens because the prototype for create_section_mapping() is in
asm/mmzone.h, but asm/mmzone.h is only included by linux/mmzone.h
when CONFIG_NUMA=y.

In fact the prototype is only needed by arch/powerpc/mm code, so move
the prototype into arch/powerpc/mm/mmu_decl.h, which also fixes the
build error.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231129131919.2528517-5-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/include/asm/mmzone.h
arch/powerpc/mm/mmu_decl.h