summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/kernel/setup.c
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2022-10-12 16:36:14 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2022-10-12 16:36:14 +0800
commitd279134168c78ac2caa1f7cd2a846579da1c93ac (patch)
treed77ab5ef3f2ac782823aea728906a7942af1c35a /arch/loongarch/kernel/setup.c
parent235d074fdc9a69e3720b8bb6efeb7c6d30c12d8e (diff)
downloadlinux-d279134168c78ac2caa1f7cd2a846579da1c93ac.tar.gz
linux-d279134168c78ac2caa1f7cd2a846579da1c93ac.tar.bz2
linux-d279134168c78ac2caa1f7cd2a846579da1c93ac.zip
LoongArch: Use TLB for ioremap()
We can support more cache attributes (e.g., CC, SUC and WUC) and page protection when we use TLB for ioremap(). The implementation is based on GENERIC_IOREMAP. The existing simple ioremap() implementation has better performance so we keep it and introduce ARCH_IOREMAP to control the selection. We move pagetable_init() earlier to make early ioremap() works, and we modify the PCI ecam mapping because the TLB-based version of ioremap() will actually take the size into account. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/setup.c')
-rw-r--r--arch/loongarch/kernel/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c
index 7fabf2306e80..05af1102fee7 100644
--- a/arch/loongarch/kernel/setup.c
+++ b/arch/loongarch/kernel/setup.c
@@ -348,10 +348,10 @@ void __init setup_arch(char **cmdline_p)
init_environ();
efi_init();
memblock_init();
+ pagetable_init();
parse_early_param();
platform_init();
- pagetable_init();
arch_mem_init(cmdline_p);
resource_init();