diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-14 18:35:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-14 18:35:30 -0500 |
commit | 6531e115b7ab84f563fcd7f0d2d05ccf971aaaf9 (patch) | |
tree | 04aa4f87b471e870a44ef94ee935d3a87bb12c4e /mm/sparse.c | |
parent | 380ef2c9ad4fdd5fdd81055857be21ae5f581877 (diff) | |
parent | 3a6ab5c7dc114057fd67750e308e1745dafc0e6a (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
"11 fixes"
* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
scripts/spdxcheck.py: always open files in binary mode
checkstack.pl: fix for aarch64
userfaultfd: check VM_MAYWRITE was set after verifying the uffd is registered
fs/iomap.c: get/put the page in iomap_page_create/release()
hugetlbfs: call VM_BUG_ON_PAGE earlier in free_huge_page()
memblock: annotate memblock_is_reserved() with __init_memblock
psi: fix reference to kernel commandline enable
arch/sh/include/asm/io.h: provide prototypes for PCI I/O mapping in asm/io.h
mm/sparse: add common helper to mark all memblocks present
mm: introduce common STRUCT_PAGE_MAX_SHIFT define
alpha: fix hang caused by the bootmem removal
Diffstat (limited to 'mm/sparse.c')
-rw-r--r-- | mm/sparse.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 33307fc05c4d..3abc8cc50201 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -240,6 +240,22 @@ void __init memory_present(int nid, unsigned long start, unsigned long end) | |||
240 | } | 240 | } |
241 | 241 | ||
242 | /* | 242 | /* |
243 | * Mark all memblocks as present using memory_present(). This is a | ||
244 | * convienence function that is useful for a number of arches | ||
245 | * to mark all of the systems memory as present during initialization. | ||
246 | */ | ||
247 | void __init memblocks_present(void) | ||
248 | { | ||
249 | struct memblock_region *reg; | ||
250 | |||
251 | for_each_memblock(memory, reg) { | ||
252 | memory_present(memblock_get_region_node(reg), | ||
253 | memblock_region_memory_base_pfn(reg), | ||
254 | memblock_region_memory_end_pfn(reg)); | ||
255 | } | ||
256 | } | ||
257 | |||
258 | /* | ||
243 | * Subtle, we encode the real pfn into the mem_map such that | 259 | * Subtle, we encode the real pfn into the mem_map such that |
244 | * the identity pfn - section_mem_map will return the actual | 260 | * the identity pfn - section_mem_map will return the actual |
245 | * physical page frame number. | 261 | * physical page frame number. |