提交 40ff7729 编写于 作者: X Xie XiuQi

arm64/mpam: add cmdline option: mpam

hulk inclusion
category: feature
bugzilla: 10897
CVE: NA

MPAM feature is just for debug and preview in this version,
so disable it by default. You can enable it by cmdline: "mpam".
Signed-off-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 39cdf0d2
......@@ -39,6 +39,8 @@ static inline void mpam_sched_in(void)
__mpam_sched_in();
}
extern int __read_mostly mpam_enabled;
#else
static inline void mpam_sched_in(void) {}
......
......@@ -1242,11 +1242,23 @@ static void mpam_domains_init(struct resctrl_resource *r)
}
}
int __read_mostly mpam_enabled;
static int __init mpam_setup(char *str)
{
mpam_enabled = 1;
return 1;
}
__setup("mpam", mpam_setup);
static int __init mpam_late_init(void)
{
struct resctrl_resource *r;
int state, ret;
if (!mpam_enabled)
return 0;
if (!cpus_have_const_cap(ARM64_HAS_MPAM))
return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册