Closed MingcongBai closed 1 month ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign tsic404 for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
关键摘要:
flush_cache_last_level
函数中硬编码的地址 CSR_DMW1_BASE
可能不适用于所有Loongson架构,需要确认是否是正确的偏移量。flush_cache_last_level
函数中的循环次数(cdesc->ways * 3
和 cdesc->sets
)可能会导致性能问题,应该评估是否有必要进行这样的循环。flush_cache_last_level
函数中的 addr += 0x100000000000;
操作可能会导致地址溢出,应该检查是否有必要进行这样的操作。flush_cache_last_level
函数缺少对 loongson_sysconf.nr_nodes
变量的有效性检查,可能会导致未定义行为。flush_cache_last_level
函数缺少注释说明其用途和行为,应该添加相应的注释以提高代码的可读性。是否建议立即修改: 是
Tested good on a Lemote 3A6000 board.
Ref: https://lore.kernel.org/loongarch/20240507074357.2156083-1-lijun01@kylinos.cn/