Messages in this thread Patch in this message | | | Subject | [PATCH -mmotm] mm/memory_hotplug: fix for CONFIG_ZONE_DEVICE not enabled | From | Randy Dunlap <> | Date | Tue, 19 Jan 2021 19:04:50 -0800 |
| |
From: Randy Dunlap <rdunlap@infradead.org>
Fix memory_hotplug.c when CONFIG_ZONE_DEVICE is not enabled.
Fixes this build error:
../mm/memory_hotplug.c: In function ‘move_pfn_range_to_zone’: ../mm/memory_hotplug.c:772:24: error: ‘ZONE_DEVICE’ undeclared (first use in this function); did you mean ‘ZONE_MOVABLE’? if (zone_idx(zone) == ZONE_DEVICE) {
Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dan Williams <dan.j.williams@intel.com> --- mm/memory_hotplug.c | 2 ++ 1 file changed, 2 insertions(+)
--- mmotm-2021-0119-1336.orig/mm/memory_hotplug.c +++ mmotm-2021-0119-1336/mm/memory_hotplug.c @@ -769,12 +769,14 @@ void __ref move_pfn_range_to_zone(struct * ZONE_DEVICE pages in an otherwise ZONE_{NORMAL,MOVABLE} * section. */ +#ifdef CONFIG_ZONE_DEVICE if (zone_idx(zone) == ZONE_DEVICE) { if (!IS_ALIGNED(start_pfn, PAGES_PER_SECTION)) section_taint_zone_device(start_pfn); if (!IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION)) section_taint_zone_device(start_pfn + nr_pages); } +#endif /* * TODO now we have a visible range of pages which are not associated
| |