提交 9406db15 编写于 作者: L liqiang

Set prefetch bug fix

上级 d177e7cb
......@@ -138,7 +138,7 @@ static ssize_t prefetch_store(struct device* dev,
mutex_lock(&prefetch_mtx);
if (policy < prefetch_policy_num()) {
on_each_cpu_mask(prefetch_cpumask_value, set_prefetch, &policy, 1);
on_each_cpu_mask(prefetch_cpumask_value, set_prefetch, prefetch_policy(policy), 1);
} else {
pr_err("policy %d is out of range\n", policy);
}
......
......@@ -96,12 +96,10 @@ static cfg_t prefetch_cfg[] = {
void set_prefetch(void* dummy)
{
cfg_t *cfg = NULL;
int policy = *(int *)dummy;
cfg_t *cfg = (cfg_t *)dummy;
unsigned long read_uniq = read_sysreg(S3_1_c15_c6_4);
if (policy < 0 || policy > PREFETCH_POLICY_MAX)
if (cfg == NULL)
return;
cfg = &prefetch_cfg[policy];
read_uniq &= CACHE_READUNIQ_CTRL;
write_sysreg(cfg->cpuprefctrl_el1 | read_uniq, S3_1_c15_c6_4);
write_sysreg(cfg->adps_lld_ddr_el1, S3_1_c15_c7_1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册