memory_hotplug.c (27cacaad16c549ce5dd30ae84100b7e680536822) memory_hotplug.c (041711ce7cdf023f53d76f64d82b75210248e18d)
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>

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

778 unsigned long flags;
779 int need_zonelists_rebuild = 0;
780 const int nid = zone_to_nid(zone);
781 int ret;
782 struct memory_notify arg;
783
784 /*
785 * {on,off}lining is constrained to full memory sections (or more
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>

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

778 unsigned long flags;
779 int need_zonelists_rebuild = 0;
780 const int nid = zone_to_nid(zone);
781 int ret;
782 struct memory_notify arg;
783
784 /*
785 * {on,off}lining is constrained to full memory sections (or more
786 * precisly to memory blocks from the user space POV).
786 * precisely to memory blocks from the user space POV).
787 * memmap_on_memory is an exception because it reserves initial part
788 * of the physical memory space for vmemmaps. That space is pageblock
789 * aligned.
790 */
791 if (WARN_ON_ONCE(!nr_pages ||
792 !IS_ALIGNED(pfn, pageblock_nr_pages) ||
793 !IS_ALIGNED(pfn + nr_pages, PAGES_PER_SECTION)))
794 return -EINVAL;

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

1575 unsigned long flags;
1576 struct zone *zone;
1577 struct memory_notify arg;
1578 int ret, node;
1579 char *reason;
1580
1581 /*
1582 * {on,off}lining is constrained to full memory sections (or more
787 * memmap_on_memory is an exception because it reserves initial part
788 * of the physical memory space for vmemmaps. That space is pageblock
789 * aligned.
790 */
791 if (WARN_ON_ONCE(!nr_pages ||
792 !IS_ALIGNED(pfn, pageblock_nr_pages) ||
793 !IS_ALIGNED(pfn + nr_pages, PAGES_PER_SECTION)))
794 return -EINVAL;

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

1575 unsigned long flags;
1576 struct zone *zone;
1577 struct memory_notify arg;
1578 int ret, node;
1579 char *reason;
1580
1581 /*
1582 * {on,off}lining is constrained to full memory sections (or more
1583 * precisly to memory blocks from the user space POV).
1583 * precisely to memory blocks from the user space POV).
1584 * memmap_on_memory is an exception because it reserves initial part
1585 * of the physical memory space for vmemmaps. That space is pageblock
1586 * aligned.
1587 */
1588 if (WARN_ON_ONCE(!nr_pages ||
1589 !IS_ALIGNED(start_pfn, pageblock_nr_pages) ||
1590 !IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION)))
1591 return -EINVAL;

--- 465 unchanged lines hidden ---
1584 * memmap_on_memory is an exception because it reserves initial part
1585 * of the physical memory space for vmemmaps. That space is pageblock
1586 * aligned.
1587 */
1588 if (WARN_ON_ONCE(!nr_pages ||
1589 !IS_ALIGNED(start_pfn, pageblock_nr_pages) ||
1590 !IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION)))
1591 return -EINVAL;

--- 465 unchanged lines hidden ---