svm: add support for allocing memory which is within 4G physical address in svm_mmap
ascend inclusion
category: feature
bugzilla: NA
CVE: NA
-------------------------------------------------
Add alloc and release memory functions in svm. And the physical address
of the memory is within 4GB.
For example:
/* alloc */
fd = open("dev/svm0",);
mmap(0, ALLOC_SIZE,, MAP_PA32BIT, fd, 0);
/* free */
ioctl(fd, SVM_IOCTL_RELEASE_PHYS32,);
close(fd);
Signed-off-by: NBixuan Cui <cuibixuan@huawei.com>
Reviewed-by: NZefan Li <lizefan@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录