The patch titled Subject: mm: introduce common definitions for the size and mask of a section has been removed from the -mm tree. Its filename was mm-introduce-common-definitions-for-the-size-and-mask-of-a-section.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Dan Williams <dan.j.williams@xxxxxxxxx> Subject: mm: introduce common definitions for the size and mask of a section Up-level the local section size and mask from kernel/memremap.c to global definitions. These will be used by the new sub-section hotplug support. Link: http://lkml.kernel.org/r/148486362333.19694.14241079169560958896.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Logan Gunthorpe <logang@xxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Stephen Bates <stephen.bates@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/mmzone.h | 2 ++ kernel/memremap.c | 10 ++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff -puN include/linux/mmzone.h~mm-introduce-common-definitions-for-the-size-and-mask-of-a-section include/linux/mmzone.h --- a/include/linux/mmzone.h~mm-introduce-common-definitions-for-the-size-and-mask-of-a-section +++ a/include/linux/mmzone.h @@ -1052,6 +1052,8 @@ static inline unsigned long early_pfn_to * PFN_SECTION_SHIFT pfn to/from section number */ #define PA_SECTION_SHIFT (SECTION_SIZE_BITS) +#define PA_SECTION_SIZE (1UL << PA_SECTION_SHIFT) +#define PA_SECTION_MASK (~(PA_SECTION_SIZE-1)) #define PFN_SECTION_SHIFT (SECTION_SIZE_BITS - PAGE_SHIFT) #define NR_MEM_SECTIONS (1UL << SECTIONS_SHIFT) diff -puN kernel/memremap.c~mm-introduce-common-definitions-for-the-size-and-mask-of-a-section kernel/memremap.c --- a/kernel/memremap.c~mm-introduce-common-definitions-for-the-size-and-mask-of-a-section +++ a/kernel/memremap.c @@ -172,8 +172,6 @@ EXPORT_SYMBOL(devm_memunmap); #ifdef CONFIG_ZONE_DEVICE static DEFINE_MUTEX(pgmap_lock); static RADIX_TREE(pgmap_radix, GFP_KERNEL); -#define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1) -#define SECTION_SIZE (1UL << PA_SECTION_SHIFT) struct page_map { struct resource res; @@ -267,8 +265,8 @@ static void devm_memremap_pages_release( } /* pages are dead and unused, undo the arch mapping */ - align_start = res->start & ~(SECTION_SIZE - 1); - align_size = ALIGN(resource_size(res), SECTION_SIZE); + align_start = res->start & PA_SECTION_MASK; + align_size = ALIGN(resource_size(res), PA_SECTION_SIZE); mem_hotplug_begin(); arch_remove_memory(align_start, align_size); mem_hotplug_done(); @@ -314,8 +312,8 @@ void *devm_memremap_pages(struct device struct page_map *page_map; int error, nid, is_ram; - align_start = res->start & ~(SECTION_SIZE - 1); - align_size = ALIGN(res->start + resource_size(res), SECTION_SIZE) + align_start = res->start & PA_SECTION_MASK; + align_size = ALIGN(res->start + resource_size(res), PA_SECTION_SIZE) - align_start; is_ram = region_intersects(align_start, align_size, IORESOURCE_SYSTEM_RAM, IORES_DESC_NONE); _ Patches currently in -mm which might be from dan.j.williams@xxxxxxxxx are mm-cleanup-sparse_init_one_section-return-value.patch mm-track-active-portions-of-a-section-at-boot.patch mm-fix-register_new_memory-zone-type-detection.patch mm-convert-kmalloc_section_memmap-to-populate_section_memmap.patch mm-prepare-for-hot-add-remove-of-sub-section-ranges.patch mm-support-section-unaligned-zone_device-memory-ranges.patch mm-enable-section-unaligned-devm_memremap_pages.patch libnvdimm-pfn-dax-stop-padding-pmem-namespaces-to-section-alignment.patch mm-fix-get_user_pages-vs-device-dax-pud-mappings.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html