mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
48593975ae
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code, preempt and kprobes conditionals over to CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Paul E. McKenney <paulmck@linux.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20190726212124.608488448@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
44 lines
975 B
ArmAsm
44 lines
975 B
ArmAsm
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash)
|
|
* Copyright 2008 by Steven Rostedt, Red Hat, Inc
|
|
* (inspired by Andi Kleen's thunk_64.S)
|
|
*/
|
|
#include <linux/linkage.h>
|
|
#include <asm/asm.h>
|
|
#include <asm/export.h>
|
|
|
|
/* put return address in eax (arg1) */
|
|
.macro THUNK name, func, put_ret_addr_in_eax=0
|
|
.globl \name
|
|
\name:
|
|
pushl %eax
|
|
pushl %ecx
|
|
pushl %edx
|
|
|
|
.if \put_ret_addr_in_eax
|
|
/* Place EIP in the arg1 */
|
|
movl 3*4(%esp), %eax
|
|
.endif
|
|
|
|
call \func
|
|
popl %edx
|
|
popl %ecx
|
|
popl %eax
|
|
ret
|
|
_ASM_NOKPROBE(\name)
|
|
.endm
|
|
|
|
#ifdef CONFIG_TRACE_IRQFLAGS
|
|
THUNK trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1
|
|
THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1
|
|
#endif
|
|
|
|
#ifdef CONFIG_PREEMPTION
|
|
THUNK ___preempt_schedule, preempt_schedule
|
|
THUNK ___preempt_schedule_notrace, preempt_schedule_notrace
|
|
EXPORT_SYMBOL(___preempt_schedule)
|
|
EXPORT_SYMBOL(___preempt_schedule_notrace)
|
|
#endif
|
|
|