summaryrefslogtreecommitdiff
path: root/kernel/memremap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-29 10:54:02 +0300
committerDan Williams <dan.j.williams@intel.com>2018-01-08 22:46:23 +0300
commit0628b8c650718f4dfedfcdc9ed136bf7e394aae7 (patch)
treefad43a2d921d6e2a97400fefe37ef6aba17d2073 /kernel/memremap.c
parent832d7aa051106c927cae05ced29d3fd31459ed21 (diff)
downloadlinux-0628b8c650718f4dfedfcdc9ed136bf7e394aae7.tar.xz
memremap: remove to_vmem_altmap
All callers are gone now. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'kernel/memremap.c')
-rw-r--r--kernel/memremap.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/kernel/memremap.c b/kernel/memremap.c
index 891c77487a6a..b09517439dec 100644
--- a/kernel/memremap.c
+++ b/kernel/memremap.c
@@ -476,32 +476,6 @@ void vmem_altmap_free(struct vmem_altmap *altmap, unsigned long nr_pfns)
altmap->alloc -= nr_pfns;
}
-struct vmem_altmap *to_vmem_altmap(unsigned long memmap_start)
-{
- /*
- * 'memmap_start' is the virtual address for the first "struct
- * page" in this range of the vmemmap array. In the case of
- * CONFIG_SPARSEMEM_VMEMMAP a page_to_pfn conversion is simple
- * pointer arithmetic, so we can perform this to_vmem_altmap()
- * conversion without concern for the initialization state of
- * the struct page fields.
- */
- struct page *page = (struct page *) memmap_start;
- struct dev_pagemap *pgmap;
-
- /*
- * Unconditionally retrieve a dev_pagemap associated with the
- * given physical address, this is only for use in the
- * arch_{add|remove}_memory() for setting up and tearing down
- * the memmap.
- */
- rcu_read_lock();
- pgmap = find_dev_pagemap(__pfn_to_phys(page_to_pfn(page)));
- rcu_read_unlock();
-
- return pgmap ? pgmap->altmap : NULL;
-}
-
/**
* get_dev_pagemap() - take a new live reference on the dev_pagemap for @pfn
* @pfn: page frame number to lookup page_map