Re: [PATCH v3] riscv: Optimize crct10dif with zbc extension

From: Zhihang Shao
Date: Wed Feb 12 2025 - 03:09:17 EST


On 2025/2/6 0:30, Eric Biggers wrote:

Maybe use 'const __be64 *' and 'const __be32 *' for the pointer, and use
be64_to_cpu() and be32_to_cpu(). Then the __force cast won't be needed.
Maybe this problem seems dumb, but I have no idea to adapt both riscv32 and riscv64. I have tried to use 'const __be64 *' and 'const __be32 *' pointer in patch v4, but I forgot to test them in riscv32, and it turns out the code failed to compile due to my mistake of defining 'const __be64 * p_ul' and of course it wouldn't be work for riscv32. Maybe I need some inspiration for this problem, or I still think it better to use 'unsigned long const *' since it works fine in both riscv64 and riscv32.

Looking forward to your reply and guidance.

Yours,

Zhihang