diff options
author | Christoph Hellwig <hch@lst.de> | 2021-10-28 17:10:17 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-12-04 12:46:09 -0800 |
commit | b80892ca022e9eb484771a66eb68e12364695a2a (patch) | |
tree | cf885643ff4806d0abacd90d2572a25621eefe80 /include | |
parent | b842f1d14a190e217a8ee3f6dae9e1dff1817d87 (diff) | |
download | linux-stable-b80892ca022e9eb484771a66eb68e12364695a2a.tar.gz linux-stable-b80892ca022e9eb484771a66eb68e12364695a2a.tar.bz2 linux-stable-b80892ca022e9eb484771a66eb68e12364695a2a.zip |
memremap: remove support for external pgmap refcounts
No driver is left using the external pgmap refcount, so remove the
code to support it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20211028151017.50234-1-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memremap.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/include/linux/memremap.h b/include/linux/memremap.h index c0e9d35889e8..a8bc588fe7aa 100644 --- a/include/linux/memremap.h +++ b/include/linux/memremap.h @@ -73,16 +73,6 @@ struct dev_pagemap_ops { void (*page_free)(struct page *page); /* - * Transition the refcount in struct dev_pagemap to the dead state. - */ - void (*kill)(struct dev_pagemap *pgmap); - - /* - * Wait for refcount in struct dev_pagemap to be idle and reap it. - */ - void (*cleanup)(struct dev_pagemap *pgmap); - - /* * Used for private (un-addressable) device memory only. Must migrate * the page back to a CPU accessible page. */ @@ -95,8 +85,7 @@ struct dev_pagemap_ops { * struct dev_pagemap - metadata for ZONE_DEVICE mappings * @altmap: pre-allocated/reserved memory for vmemmap allocations * @ref: reference count that pins the devm_memremap_pages() mapping - * @internal_ref: internal reference if @ref is not provided by the caller - * @done: completion for @internal_ref + * @done: completion for @ref * @type: memory type: see MEMORY_* in memory_hotplug.h * @flags: PGMAP_* flags to specify defailed behavior * @ops: method table @@ -109,8 +98,7 @@ struct dev_pagemap_ops { */ struct dev_pagemap { struct vmem_altmap altmap; - struct percpu_ref *ref; - struct percpu_ref internal_ref; + struct percpu_ref ref; struct completion done; enum memory_type type; unsigned int flags; @@ -191,7 +179,7 @@ static inline unsigned long memremap_compat_align(void) static inline void put_dev_pagemap(struct dev_pagemap *pgmap) { if (pgmap) - percpu_ref_put(pgmap->ref); + percpu_ref_put(&pgmap->ref); } #endif /* _LINUX_MEMREMAP_H_ */ |