forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/x86/xen/xen-head.S
....@@ -22,7 +22,7 @@
2222
2323 #ifdef CONFIG_XEN_PV
2424 __INIT
25
-ENTRY(startup_xen)
25
+SYM_CODE_START(startup_xen)
2626 UNWIND_HINT_EMPTY
2727 cld
2828
....@@ -35,33 +35,43 @@
3535 rep __ASM_SIZE(stos)
3636
3737 mov %_ASM_SI, xen_start_info
38
- mov $init_thread_union+THREAD_SIZE, %_ASM_SP
38
+ mov initial_stack(%rip), %rsp
3939
40
-#ifdef CONFIG_X86_64
4140 /* Set up %gs.
4241 *
43
- * The base of %gs always points to the bottom of the irqstack
44
- * union. If the stack protector canary is enabled, it is
45
- * located at %gs:40. Note that, on SMP, the boot cpu uses
46
- * init data section till per cpu areas are set up.
42
+ * The base of %gs always points to fixed_percpu_data. If the
43
+ * stack protector canary is enabled, it is located at %gs:40.
44
+ * Note that, on SMP, the boot cpu uses init data section until
45
+ * the per cpu areas are set up.
4746 */
4847 movl $MSR_GS_BASE,%ecx
49
- movq $INIT_PER_CPU_VAR(irq_stack_union),%rax
48
+ movq $INIT_PER_CPU_VAR(fixed_percpu_data),%rax
5049 cdq
5150 wrmsr
52
-#endif
5351
54
- jmp xen_start_kernel
55
-END(startup_xen)
52
+ call xen_start_kernel
53
+SYM_CODE_END(startup_xen)
5654 __FINIT
55
+
56
+#ifdef CONFIG_XEN_PV_SMP
57
+.pushsection .text
58
+SYM_CODE_START(asm_cpu_bringup_and_idle)
59
+ UNWIND_HINT_EMPTY
60
+
61
+ call cpu_bringup_and_idle
62
+SYM_CODE_END(asm_cpu_bringup_and_idle)
63
+.popsection
64
+#endif
5765 #endif
5866
5967 .pushsection .text
6068 .balign PAGE_SIZE
61
-ENTRY(hypercall_page)
69
+SYM_CODE_START(hypercall_page)
6270 .rept (PAGE_SIZE / 32)
63
- UNWIND_HINT_EMPTY
64
- .skip 32
71
+ UNWIND_HINT_FUNC
72
+ ANNOTATE_UNRET_SAFE
73
+ ret
74
+ .skip 31, 0xcc
6575 .endr
6676
6777 #define HYPERCALL(n) \
....@@ -69,7 +79,7 @@
6979 .type xen_hypercall_##n, @function; .size xen_hypercall_##n, 32
7080 #include <asm/xen-hypercalls.h>
7181 #undef HYPERCALL
72
-END(hypercall_page)
82
+SYM_CODE_END(hypercall_page)
7383 .popsection
7484
7585 ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux")