mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
88a28bec86
commit
b3bc07aec7
@@ -43,10 +43,5 @@ u64 memory_hotplug_max(void);
|
|||||||
#define memory_hotplug_max() memblock_end_of_DRAM()
|
#define memory_hotplug_max() memblock_end_of_DRAM()
|
||||||
#endif /* CONFIG_NUMA */
|
#endif /* CONFIG_NUMA */
|
||||||
|
|
||||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
|
||||||
extern int create_section_mapping(unsigned long start, unsigned long end,
|
|
||||||
int nid, pgprot_t prot);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __KERNEL__ */
|
#endif /* __KERNEL__ */
|
||||||
#endif /* _ASM_MMZONE_H_ */
|
#endif /* _ASM_MMZONE_H_ */
|
||||||
|
|||||||
@@ -190,3 +190,8 @@ static inline bool debug_pagealloc_enabled_or_kfence(void)
|
|||||||
{
|
{
|
||||||
return IS_ENABLED(CONFIG_KFENCE) || debug_pagealloc_enabled();
|
return IS_ENABLED(CONFIG_KFENCE) || debug_pagealloc_enabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||||
|
int create_section_mapping(unsigned long start, unsigned long end,
|
||||||
|
int nid, pgprot_t prot);
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user