--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
-@@ -652,7 +652,6 @@ static void __init arch_mem_init(char **
+@@ -652,8 +652,6 @@ static void __init arch_mem_init(char **
memblock_reserve(crashk_res.start,
crashk_res.end - crashk_res.start + 1);
#endif
- device_tree_init();
- sparse_init();
- plat_swiotlb_setup();
-
-@@ -760,6 +759,7 @@ void __init setup_arch(char **cmdline_p)
+-
+ /*
+ * In order to reduce the possibility of kernel panic when failed to
+ * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate
+@@ -770,6 +768,7 @@ void __init setup_arch(char **cmdline_p)
cpu_cache_init();
paging_init();