[PATCH 09/28] microblaze: introduce arch_zone_limits_init()

Mike Rapoport
2025-12-28T12:42:32Z

arch/microblaze/mm/init.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 31d475cdb1c5..54da60b81094 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -54,6 +54,16 @@ static void __init highmem_init(void)
}
#endif /* CONFIG_HIGHMEM */

+void __init arch_zone_limits_init(unsigned long *max_zone_pfns)
+{
+#ifdef CONFIG_HIGHMEM
+ max_zone_pfns[ZONE_DMA] = max_low_pfn;
+ max_zone_pfns[ZONE_HIGHMEM] = max_pfn;
+#else
+ max_zone_pfns[ZONE_DMA] = max_pfn;
+#endif
+}
+
/*
* paging_init() sets up the page tables - in fact we've already done this.
*/
@@ -71,13 +81,8 @@ static void __init paging_init(void)

#ifdef CONFIG_HIGHMEM
highmem_init();
-
- zones_size[ZONE_DMA] = max_low_pfn;
- zones_size[ZONE_HIGHMEM] = max_pfn;
-#else
- zones_size[ZONE_DMA] = max_pfn;
#endif
-
+ arch_zone_limits_init(zones_size);
/* We don't have holes in memory map */
free_area_init(zones_size);