1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Save registers before calling assembly functions. This avoids
4 * disturbance of register allocation in some inline assembly constructs.
5 * Copyright 2001,2002 by Andi Kleen, SuSE Labs.
7 #include <linux/linkage.h>
10 #include <asm/export.h>
12 /* rdi: arg1 ... normal C conventions. rax is saved/restored. */
13 .macro THUNK name, func
14 SYM_FUNC_START_NOALIGN(\name)
34 #ifdef CONFIG_PREEMPTION
35 THUNK preempt_schedule_thunk, preempt_schedule
36 THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace
37 EXPORT_SYMBOL(preempt_schedule_thunk)
38 EXPORT_SYMBOL(preempt_schedule_notrace_thunk)
41 #ifdef CONFIG_PREEMPTION
42 SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore)
54 _ASM_NOKPROBE(__thunk_restore)
55 SYM_CODE_END(__thunk_restore)