hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/x86/entry/thunk_32.S
....@@ -1,8 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash)
34 * Copyright 2008 by Steven Rostedt, Red Hat, Inc
45 * (inspired by Andi Kleen's thunk_64.S)
5
- * Subject to the GNU public license, v.2. No warranty of any kind.
66 */
77 #include <linux/linkage.h>
88 #include <asm/asm.h>
....@@ -10,8 +10,7 @@
1010
1111 /* put return address in eax (arg1) */
1212 .macro THUNK name, func, put_ret_addr_in_eax=0
13
- .globl \name
14
-\name:
13
+SYM_CODE_START_NOALIGN(\name)
1514 pushl %eax
1615 pushl %ecx
1716 pushl %edx
....@@ -25,19 +24,13 @@
2524 popl %edx
2625 popl %ecx
2726 popl %eax
28
- ret
27
+ RET
2928 _ASM_NOKPROBE(\name)
29
+SYM_CODE_END(\name)
3030 .endm
3131
32
-#ifdef CONFIG_TRACE_IRQFLAGS
33
- THUNK trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1
34
- THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1
35
-#endif
36
-
37
-#ifdef CONFIG_PREEMPT
38
- THUNK ___preempt_schedule, preempt_schedule
39
- THUNK ___preempt_schedule_notrace, preempt_schedule_notrace
40
- EXPORT_SYMBOL(___preempt_schedule)
41
- EXPORT_SYMBOL(___preempt_schedule_notrace)
42
-#endif
32
+ THUNK preempt_schedule_thunk, preempt_schedule
33
+ THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace
34
+ EXPORT_SYMBOL(preempt_schedule_thunk)
35
+ EXPORT_SYMBOL(preempt_schedule_notrace_thunk)
4336