hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/init/main.c
....@@ -96,13 +96,11 @@
9696 #include <linux/cache.h>
9797 #include <linux/rodata_test.h>
9898 #include <linux/jump_label.h>
99
-#include <linux/mem_encrypt.h>
10099 #include <linux/kcsan.h>
101100 #include <linux/init_syscalls.h>
102101 #include <linux/stackdepot.h>
103102
104103 #include <asm/io.h>
105
-#include <asm/bugs.h>
106104 #include <asm/setup.h>
107105 #include <asm/sections.h>
108106 #include <asm/cacheflush.h>
....@@ -766,8 +764,6 @@
766764 }
767765 #endif
768766
769
-void __init __weak mem_encrypt_init(void) { }
770
-
771767 void __init __weak poking_init(void) { }
772768
773769 void __init __weak pgtable_cache_init(void) { }
....@@ -835,6 +831,7 @@
835831 init_espfix_bsp();
836832 /* Should be run after espfix64 is set up. */
837833 pti_init();
834
+ mm_cache_init();
838835 }
839836
840837 void __init __weak arch_call_rest_init(void)
....@@ -915,7 +912,7 @@
915912 sort_main_extable();
916913 trap_init();
917914 mm_init();
918
-
915
+ poking_init();
919916 ftrace_init();
920917
921918 /* trace_printk can be enabled here */
....@@ -1006,14 +1003,6 @@
10061003 */
10071004 locking_selftest();
10081005
1009
- /*
1010
- * This needs to be called before any devices perform DMA
1011
- * operations that might use the SWIOTLB bounce buffers. It will
1012
- * mark the bounce buffers as decrypted so that their usage will
1013
- * not cause "plain-text" data to be decrypted when accessed.
1014
- */
1015
- mem_encrypt_init();
1016
-
10171006 #ifdef CONFIG_BLK_DEV_INITRD
10181007 if (initrd_start && !initrd_below_start_ok &&
10191008 page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) {
....@@ -1030,6 +1019,9 @@
10301019 late_time_init();
10311020 sched_clock_init();
10321021 calibrate_delay();
1022
+
1023
+ arch_cpu_finalize_init();
1024
+
10331025 pid_idr_init();
10341026 anon_vma_init();
10351027 #ifdef CONFIG_X86
....@@ -1055,9 +1047,6 @@
10551047 cgroup_init();
10561048 taskstats_init_early();
10571049 delayacct_init();
1058
-
1059
- poking_init();
1060
- check_bugs();
10611050
10621051 acpi_subsystem_init();
10631052 arch_post_acpi_subsys_init();