.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash) |
---|
3 | 4 | * Copyright 2008 by Steven Rostedt, Red Hat, Inc |
---|
4 | 5 | * (inspired by Andi Kleen's thunk_64.S) |
---|
5 | | - * Subject to the GNU public license, v.2. No warranty of any kind. |
---|
6 | 6 | */ |
---|
7 | 7 | #include <linux/linkage.h> |
---|
8 | 8 | #include <asm/asm.h> |
---|
.. | .. |
---|
10 | 10 | |
---|
11 | 11 | /* put return address in eax (arg1) */ |
---|
12 | 12 | .macro THUNK name, func, put_ret_addr_in_eax=0 |
---|
13 | | - .globl \name |
---|
14 | | -\name: |
---|
| 13 | +SYM_CODE_START_NOALIGN(\name) |
---|
15 | 14 | pushl %eax |
---|
16 | 15 | pushl %ecx |
---|
17 | 16 | pushl %edx |
---|
.. | .. |
---|
25 | 24 | popl %edx |
---|
26 | 25 | popl %ecx |
---|
27 | 26 | popl %eax |
---|
28 | | - ret |
---|
| 27 | + RET |
---|
29 | 28 | _ASM_NOKPROBE(\name) |
---|
| 29 | +SYM_CODE_END(\name) |
---|
30 | 30 | .endm |
---|
31 | 31 | |
---|
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) |
---|
43 | 36 | |
---|