LoongArch: Use common function sign_extend64()
authorTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 17 Jan 2023 03:42:16 +0000 (11:42 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Tue, 17 Jan 2023 03:42:16 +0000 (11:42 +0800)
commit2959fce7fdb73fc784aefd58cc34b1ba700826aa
tree36e908ae88eb32480cddd35fc422c8d2df2fbc62
parentd52fec86a465355b379e839fa372ead0334d62e6
LoongArch: Use common function sign_extend64()

There exists a common function sign_extend64() to sign extend a 64-bit
value using specified bit as sign-bit in include/linux/bitops.h, it is
more efficient, let us use it and remove the arch-specific sign_extend()
under arch/loongarch.

Suggested-by: Jinyang He <hejinyang@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/inst.h
arch/loongarch/kernel/alternative.c