提交 1db43c8a 编写于 作者: W Wang Wensheng 提交者: Yang Yingliang

share_pool: Accept device_id in k2u flags

ascend inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SON8
CVE: NA

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

We use device_id to select the correct dvpp vspace range when SP_DVPP
flag is specified.
Signed-off-by: NWang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 5fe50a03
...@@ -2856,10 +2856,11 @@ static int sp_k2u_prepare(unsigned long kva, unsigned long size, ...@@ -2856,10 +2856,11 @@ static int sp_k2u_prepare(unsigned long kva, unsigned long size,
trace_sp_k2u_begin(kc); trace_sp_k2u_begin(kc);
if (sp_flags & ~SP_DVPP) { if (sp_flags & ~SP_FLAG_MASK) {
pr_err_ratelimited("k2u sp_flags %lx error\n", sp_flags); pr_err_ratelimited("k2u sp_flags %lx error\n", sp_flags);
return -EINVAL; return -EINVAL;
} }
sp_flags &= ~SP_HUGEPAGE;
if (!current->mm) { if (!current->mm) {
pr_err_ratelimited("k2u: kthread is not allowed\n"); pr_err_ratelimited("k2u: kthread is not allowed\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册