* [to-be-updated] mm-introduce-common-definitions-for-the-size-and-mask-of-a-section.patch removed from -mm tree
@ 2017-02-15 21:51 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-02-15 21:51 UTC (permalink / raw)
To: dan.j.williams, hannes, logang, mgorman, mhocko, stephen.bates,
vbabka, mm-commits
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@intel.com>
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@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Stephen Bates <stephen.bates@microsemi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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@intel.com 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-15 21:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 21:51 [to-be-updated] mm-introduce-common-definitions-for-the-size-and-mask-of-a-section.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.