Commit c1530afc authored by Yuan Can's avatar Yuan Can Committed by Jian Zhang
Browse files

ascend: export interfaces required by ascend drivers

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG


CVE: NA

--------------------------------

Export oom_type_notifier_call map_kernel_range and
__get_vm_area_caller for ascend drivers.
Export pm_autosleep_set_state and __vmalloc_node_range.
Export alloc_workqueue_attrs, free_workqueue_attrs
and apply_workqueue_attrs.

Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
parent 60a48ea1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ int pm_autosleep_set_state(suspend_state_t state)
	mutex_unlock(&autosleep_lock);
	return 0;
}
EXPORT_SYMBOL_GPL(pm_autosleep_set_state);

int __init pm_autosleep_init(void)
{
+3 −0
Original line number Diff line number Diff line
@@ -3353,6 +3353,7 @@ void free_workqueue_attrs(struct workqueue_attrs *attrs)
		kfree(attrs);
	}
}
EXPORT_SYMBOL_GPL(free_workqueue_attrs);

/**
 * alloc_workqueue_attrs - allocate a workqueue_attrs
@@ -3378,6 +3379,7 @@ struct workqueue_attrs *alloc_workqueue_attrs(void)
	free_workqueue_attrs(attrs);
	return NULL;
}
EXPORT_SYMBOL_GPL(alloc_workqueue_attrs);

static void copy_workqueue_attrs(struct workqueue_attrs *to,
				 const struct workqueue_attrs *from)
@@ -4092,6 +4094,7 @@ int apply_workqueue_attrs(struct workqueue_struct *wq,

	return ret;
}
EXPORT_SYMBOL_GPL(apply_workqueue_attrs);

/**
 * wq_update_unbound_numa - update NUMA affinity of a wq for CPU hot[un]plug
+1 −0
Original line number Diff line number Diff line
@@ -1119,6 +1119,7 @@ int oom_type_notifier_call(unsigned int type, struct oom_control *oc)

	return blocking_notifier_call_chain(&oom_type_notify_list, type, NULL);
}
EXPORT_SYMBOL_GPL(oom_type_notifier_call);
#endif

/**
+3 −0
Original line number Diff line number Diff line
@@ -643,6 +643,7 @@ int map_kernel_range(unsigned long start, unsigned long size, pgprot_t prot,
	flush_cache_vmap(start, start + size);
	return ret;
}
EXPORT_SYMBOL(map_kernel_range);

int is_vmalloc_or_module_addr(const void *x)
{
@@ -2460,6 +2461,7 @@ struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,
	return __get_vm_area_node(size, 1, PAGE_SHIFT, flags, start, end,
				  NUMA_NO_NODE, GFP_KERNEL, caller);
}
EXPORT_SYMBOL(__get_vm_area_caller);

/**
 * get_vm_area - reserve a contiguous kernel virtual area
@@ -3058,6 +3060,7 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,

	return NULL;
}
EXPORT_SYMBOL_GPL(__vmalloc_node_range);

/**
 * __vmalloc_node - allocate virtually contiguous memory