From: Ma Wupeng mawupeng1@huawei.com
euleros inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7WLVX
---------------------------------------------
Remove unused gm_mappings_free.
Signed-off-by: Ma Wupeng mawupeng1@huawei.com --- include/linux/gmem.h | 1 - mm/gmem.c | 19 ------------------- 2 files changed, 20 deletions(-)
diff --git a/include/linux/gmem.h b/include/linux/gmem.h index 6fd4580166f6..000fe446f1e3 100644 --- a/include/linux/gmem.h +++ b/include/linux/gmem.h @@ -338,7 +338,6 @@ vm_fault_t gm_host_fault_locked(struct vm_fault *vmf, enum page_entry_size pe_si extern gm_ret_t gm_dev_register_physmem(gm_dev_t *dev, gm_pa_t begin, gm_pa_t end); extern void gm_dev_unregister_physmem(gm_dev_t *dev, unsigned int nid); extern gm_mapping_t *gm_mappings_alloc(unsigned int nid, unsigned int order); -extern void gm_mappings_free(gm_mapping_t *mapping, unsigned int order); extern gm_ret_t gm_as_create(gm_va_t begin, gm_va_t end, gm_as_alloc_t policy, gm_va_t cache_quantum, gm_as_t **new_as); extern gm_ret_t gm_as_destroy(gm_as_t *as); extern gm_ret_t gm_as_attach(gm_as_t *as, gm_dev_t *dev, gm_mmu_mode_t mode, bool activate, gm_context_t **out_ctx); diff --git a/mm/gmem.c b/mm/gmem.c index 73ce5b2235a4..a8c52cc87fb8 100644 --- a/mm/gmem.c +++ b/mm/gmem.c @@ -433,25 +433,6 @@ gm_mapping_t *gm_mappings_alloc(unsigned int nid, unsigned int order) } EXPORT_SYMBOL_GPL(gm_mappings_alloc);
-void gm_mappings_free(gm_mapping_t *mapping, unsigned int order) -{ - gm_mapping_t *entry; - struct hnode *node = get_hnode(mapping->node_id); - XA_STATE(xas, &node->pages, 0); - - /* TODO: support order > 0 */ - if (order != 0) - return; - - xas_for_each(&xas, entry, ULONG_MAX) { - if (entry == mapping) { - xas_set_mark(&xas, XA_MARK_0); - break; - } - } -} -EXPORT_SYMBOL_GPL(gm_mappings_free); - /* GMEM Virtual Address Space API */ gm_ret_t gm_as_create(gm_va_t begin, gm_va_t end, gm_as_alloc_t policy, gm_va_t cache_quantum, gm_as_t **new_as)