diff options
author | 2024-09-04 12:15:38 +0200 | |
---|---|---|
committer | 2024-09-04 12:15:38 +0200 | |
commit | eb876ea724835126f215c9a5bcc9e6148e2a6d15 (patch) | |
tree | 689c215270b023c2f94a6629c7f1d3ef8e49c28a /mm/sparse.c | |
parent | cpu/hotplug: Provide weak fallback for arch_cpuhp_init_parallel_bringup() (diff) | |
parent | Merge tag 'ata-6.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux (diff) | |
download | wireguard-linux-eb876ea724835126f215c9a5bcc9e6148e2a6d15.tar.xz wireguard-linux-eb876ea724835126f215c9a5bcc9e6148e2a6d15.zip |
Merge branch 'linus' into smp/core
Pull in upstream changes so further patches don't conflict.
Diffstat (limited to 'mm/sparse.c')
-rw-r--r-- | mm/sparse.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index e4b830091d13..dc38539f8560 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -129,7 +129,7 @@ static inline int sparse_early_nid(struct mem_section *section) static void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn, unsigned long *end_pfn) { - unsigned long max_sparsemem_pfn = 1UL << (MAX_PHYSMEM_BITS-PAGE_SHIFT); + unsigned long max_sparsemem_pfn = (PHYSMEM_END + 1) >> PAGE_SHIFT; /* * Sanity checks - do not allow an architecture to pass @@ -463,7 +463,7 @@ static void __init sparse_buffer_init(unsigned long size, int nid) sparsemap_buf = memmap_alloc(size, section_map_size(), addr, nid, true); sparsemap_buf_end = sparsemap_buf + size; #ifndef CONFIG_SPARSEMEM_VMEMMAP - mod_node_early_perpage_metadata(nid, DIV_ROUND_UP(size, PAGE_SIZE)); + memmap_boot_pages_add(DIV_ROUND_UP(size, PAGE_SIZE)); #endif } @@ -643,8 +643,7 @@ static void depopulate_section_memmap(unsigned long pfn, unsigned long nr_pages, unsigned long start = (unsigned long) pfn_to_page(pfn); unsigned long end = start + nr_pages * sizeof(struct page); - mod_node_page_state(page_pgdat(pfn_to_page(pfn)), NR_MEMMAP, - -1L * (DIV_ROUND_UP(end - start, PAGE_SIZE))); + memmap_pages_add(-1L * (DIV_ROUND_UP(end - start, PAGE_SIZE))); vmemmap_free(start, end, altmap); } static void free_map_bootmem(struct page *memmap) |