OSDN Git Service

LoongArch: Make the CPUCFG&CSR ops simple aliases of compiler built-ins
authorWANG Xuerui <git@xen0n.name>
Thu, 29 Jun 2023 12:58:43 +0000 (20:58 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Thu, 29 Jun 2023 12:58:43 +0000 (20:58 +0800)
commit53a4858ccd0d27538f9ab1ac2bead002fca97edc
treecbff11a03a0a04c384bb3495030b6b7ee50d495e
parent38bb46f94544c5385bc35aa2bfc776dcf53a7b5d
LoongArch: Make the CPUCFG&CSR ops simple aliases of compiler built-ins

In addition to less visual clutter, this also makes Clang happy
regarding the const-ness of arguments. In the original approach, all
Clang gets to see is the incoming arguments whose const-ness cannot be
proven without first being inlined; so Clang errors out here while GCC
is fine.

While at it, tweak several printk format strings because the return type
of csr_read64 becomes effectively unsigned long, instead of unsigned
long long.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/loongarch.h
arch/loongarch/kernel/traps.c
arch/loongarch/lib/dump_tlb.c