提交 2643efc0 编写于 作者: X Xie XiuQi

arm64/mpam: set MPAM1_EL1/MPAM2_EL2 in mpam_sched_in()

hulk inclusion
category: feature
bugzilla: 5510
CVE: NA
Signed-off-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 a7240fe5
......@@ -71,10 +71,23 @@ static void __mpam_sched_in(void)
state->cur_closid = partid;
state->cur_rmid = pmg;
/* set in EL0 */
reg = read_sysreg_s(SYS_MPAM0_EL1);
reg = reg & (~PARTID_MASK) & partid;
reg = reg & (~PMG_MASK) & pmg;
write_sysreg_s(reg, SYS_MPAM0_EL1);
/* set in EL1 */
reg = read_sysreg_s(SYS_MPAM1_EL1);
reg = reg & (~PARTID_MASK) & partid;
reg = reg & (~PMG_MASK) & pmg;
write_sysreg_s(reg, SYS_MPAM1_EL1);
/* set in EL2 */
reg = read_sysreg_s(SYS_MPAM2_EL2);
reg = reg & (~PARTID_MASK) & partid;
reg = reg & (~PMG_MASK) & pmg;
write_sysreg_s(reg, SYS_MPAM2_EL2);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册