#include <linux/device.h>
#include <linux/io.h>
#include <linux/kasan.h>
#include <linux/memory_hotplug.h>
#include <linux/memremap.h>
#include <linux/pfn_t.h>
#include <linux/swap.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <linux/swapops.h>
#include <linux/types.h>
#include <linux/wait_bit.h>
#include <linux/xarray.h>
#include "internal.h"
static DEFINE_XARRAY(pgmap_array);
#ifndef CONFIG_ARCH_HAS_MEMREMAP_COMPAT_ALIGN
unsigned long memremap_compat_align(void)
{ … }
EXPORT_SYMBOL_GPL(…);
#endif
#ifdef CONFIG_FS_DAX
DEFINE_STATIC_KEY_FALSE(devmap_managed_key);
EXPORT_SYMBOL(…);
static void devmap_managed_enable_put(struct dev_pagemap *pgmap)
{ … }
static void devmap_managed_enable_get(struct dev_pagemap *pgmap)
{ … }
#else
static void devmap_managed_enable_get(struct dev_pagemap *pgmap)
{
}
static void devmap_managed_enable_put(struct dev_pagemap *pgmap)
{
}
#endif
static void pgmap_array_delete(struct range *range)
{ … }
static unsigned long pfn_first(struct dev_pagemap *pgmap, int range_id)
{ … }
bool pgmap_pfn_valid(struct dev_pagemap *pgmap, unsigned long pfn)
{ … }
static unsigned long pfn_end(struct dev_pagemap *pgmap, int range_id)
{ … }
static unsigned long pfn_len(struct dev_pagemap *pgmap, unsigned long range_id)
{ … }
static void pageunmap_range(struct dev_pagemap *pgmap, int range_id)
{ … }
void memunmap_pages(struct dev_pagemap *pgmap)
{ … }
EXPORT_SYMBOL_GPL(…);
static void devm_memremap_pages_release(void *data)
{ … }
static void dev_pagemap_percpu_release(struct percpu_ref *ref)
{ … }
static int pagemap_range(struct dev_pagemap *pgmap, struct mhp_params *params,
int range_id, int nid)
{ … }
void *memremap_pages(struct dev_pagemap *pgmap, int nid)
{ … }
EXPORT_SYMBOL_GPL(…);
void *devm_memremap_pages(struct device *dev, struct dev_pagemap *pgmap)
{ … }
EXPORT_SYMBOL_GPL(…);
void devm_memunmap_pages(struct device *dev, struct dev_pagemap *pgmap)
{ … }
EXPORT_SYMBOL_GPL(…);
struct dev_pagemap *get_dev_pagemap(unsigned long pfn,
struct dev_pagemap *pgmap)
{ … }
EXPORT_SYMBOL_GPL(…);
void free_zone_device_folio(struct folio *folio)
{ … }
void zone_device_page_init(struct page *page)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_FS_DAX
bool __put_devmap_managed_folio_refs(struct folio *folio, int refs)
{ … }
EXPORT_SYMBOL(…);
#endif