提交 d2a948d2 编写于 作者: P Paul Martin 提交者: Ralf Baechle

MIPS: Octeon: Make octeon-md5 driver endian-agnostic

The octeon crypto co-processor expects values to be big endian.
Wrap the data transfers with cpu_to_be64() and be64_to_cpu()
transformations.

This passes for all the MD5 test vectors in crypto/testmgr.h
Signed-off-by: NPaul Martin <paul.martin@codethink.co.uk>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9631/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 8a5cc923
......@@ -33,7 +33,7 @@ do { \
__asm__ __volatile__ ( \
"dmtc2 %[rt],0x0048+" STR(index) \
: \
: [rt] "d" (value)); \
: [rt] "d" (cpu_to_be64(value))); \
} while (0)
/*
......@@ -48,7 +48,7 @@ do { \
: [rt] "=d" (__value) \
: ); \
\
__value; \
be64_to_cpu(__value); \
})
/*
......@@ -59,7 +59,7 @@ do { \
__asm__ __volatile__ ( \
"dmtc2 %[rt],0x0040+" STR(index) \
: \
: [rt] "d" (value)); \
: [rt] "d" (cpu_to_be64(value))); \
} while (0)
/*
......@@ -70,7 +70,7 @@ do { \
__asm__ __volatile__ ( \
"dmtc2 %[rt],0x4047" \
: \
: [rt] "d" (value)); \
: [rt] "d" (cpu_to_be64(value))); \
} while (0)
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册