summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/lib
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2023-06-29 20:58:43 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2023-06-29 20:58:43 +0800
commit53a4858ccd0d27538f9ab1ac2bead002fca97edc (patch)
treecbff11a03a0a04c384bb3495030b6b7ee50d495e /arch/loongarch/lib
parent38bb46f94544c5385bc35aa2bfc776dcf53a7b5d (diff)
downloadlinux-53a4858ccd0d27538f9ab1ac2bead002fca97edc.tar.gz
linux-53a4858ccd0d27538f9ab1ac2bead002fca97edc.tar.bz2
linux-53a4858ccd0d27538f9ab1ac2bead002fca97edc.zip
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>
Diffstat (limited to 'arch/loongarch/lib')
-rw-r--r--arch/loongarch/lib/dump_tlb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/loongarch/lib/dump_tlb.c b/arch/loongarch/lib/dump_tlb.c
index c2cc7ce343c9..0b886a6e260f 100644
--- a/arch/loongarch/lib/dump_tlb.c
+++ b/arch/loongarch/lib/dump_tlb.c
@@ -20,9 +20,9 @@ void dump_tlb_regs(void)
pr_info("Index : 0x%0x\n", read_csr_tlbidx());
pr_info("PageSize : 0x%0x\n", read_csr_pagesize());
- pr_info("EntryHi : 0x%0*llx\n", field, read_csr_entryhi());
- pr_info("EntryLo0 : 0x%0*llx\n", field, read_csr_entrylo0());
- pr_info("EntryLo1 : 0x%0*llx\n", field, read_csr_entrylo1());
+ pr_info("EntryHi : 0x%0*lx\n", field, read_csr_entryhi());
+ pr_info("EntryLo0 : 0x%0*lx\n", field, read_csr_entrylo0());
+ pr_info("EntryLo1 : 0x%0*lx\n", field, read_csr_entrylo1());
}
static void dump_tlb(int first, int last)