提交 be3d1f1b 编写于 作者: D Dai Xin 提交者: guzitao

sw64: lib: fix __iowrite64_copy()

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG

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

The mb() is supposed to be in the loop as what __iowrite32_copy()
does. Besides, CONFIG_64BIT is always true for SW64, so remove the
redundant #if statement.
Signed-off-by: NDai Xin <daixin@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
上级 e38cdccf
......@@ -41,15 +41,12 @@ void __iowrite64_copy(void __iomem *to,
const void *from,
size_t count)
{
#ifdef CONFIG_64BIT
u64 __iomem *dst = to;
const u64 *src = from;
const u64 *end = src + count;
while (src < end)
while (src < end) {
__raw_writeq(*src++, dst++);
mb();
#else
__iowrite32_copy(to, from, count * 2);
#endif
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册