memory_hotplug.c (013339df116c2ee0d796dd8bfb8f293a2030c063) memory_hotplug.c (77bc7fd607dee2ffb28daff6d0dd8ae42af61ea8)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/mm/memory_hotplug.c
4 *
5 * Copyright (C)
6 */
7
8#include <linux/stddef.h>

--- 582 unchanged lines hidden (view full) ---

591
592void generic_online_page(struct page *page, unsigned int order)
593{
594 /*
595 * Freeing the page with debug_pagealloc enabled will try to unmap it,
596 * so we should map it first. This is better than introducing a special
597 * case in page freeing fast path.
598 */
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * linux/mm/memory_hotplug.c
4 *
5 * Copyright (C)
6 */
7
8#include <linux/stddef.h>

--- 582 unchanged lines hidden (view full) ---

591
592void generic_online_page(struct page *page, unsigned int order)
593{
594 /*
595 * Freeing the page with debug_pagealloc enabled will try to unmap it,
596 * so we should map it first. This is better than introducing a special
597 * case in page freeing fast path.
598 */
599 if (debug_pagealloc_enabled_static())
600 kernel_map_pages(page, 1 << order, 1);
599 debug_pagealloc_map_pages(page, 1 << order);
601 __free_pages_core(page, order);
602 totalram_pages_add(1UL << order);
603#ifdef CONFIG_HIGHMEM
604 if (PageHighMem(page))
605 totalhigh_pages_add(1UL << order);
606#endif
607}
608EXPORT_SYMBOL_GPL(generic_online_page);

--- 1219 unchanged lines hidden ---
600 __free_pages_core(page, order);
601 totalram_pages_add(1UL << order);
602#ifdef CONFIG_HIGHMEM
603 if (PageHighMem(page))
604 totalhigh_pages_add(1UL << order);
605#endif
606}
607EXPORT_SYMBOL_GPL(generic_online_page);

--- 1219 unchanged lines hidden ---