All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] x86: reimplement ___preempt_schedule*() using THUNK helpers
@ 2014-09-21 18:41 Oleg Nesterov
  2014-09-21 18:41 ` [PATCH v3 1/2] " Oleg Nesterov
  2014-09-21 18:42 ` [PATCH v3 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o" Oleg Nesterov
  0 siblings, 2 replies; 25+ messages in thread
From: Oleg Nesterov @ 2014-09-21 18:41 UTC (permalink / raw)
  To: H. Peter Anvin, Ingo Molnar
  Cc: Andi Kleen, Andy Lutomirski, Denys Vlasenko, Peter Zijlstra, x86,
	linux-kernel

Peter, Ingo, please consider for inclusion.

Changes:

	v3: added the acks from Andy, otherwise unchanged

	v2: fix the naming in thunk_32.S (thanks Denys!)

And it seems that the patch below (on top of 1/2) also makes sense...

Oleg.

 arch/x86/kernel/Makefile  |    2 --
 arch/x86/kernel/preempt.S |   25 -------------------------
 arch/x86/lib/Makefile     |    2 +-
 arch/x86/lib/thunk_32.S   |   20 ++++++++++++++++----
 arch/x86/lib/thunk_64.S   |    7 +++++++
 5 files changed, 24 insertions(+), 32 deletions(-)


--- x/arch/x86/include/asm/irqflags.h
+++ x/arch/x86/include/asm/irqflags.h
@@ -166,8 +166,9 @@ static inline int arch_irqs_disabled(voi
 
 #else
 
-#ifdef CONFIG_X86_64
 #define ARCH_LOCKDEP_SYS_EXIT		call lockdep_sys_exit_thunk
+
+#ifdef CONFIG_X86_64
 #define ARCH_LOCKDEP_SYS_EXIT_IRQ	\
 	TRACE_IRQS_ON; \
 	sti; \
@@ -176,17 +177,7 @@ static inline int arch_irqs_disabled(voi
 	RESTORE_REST; \
 	cli; \
 	TRACE_IRQS_OFF;
-
 #else
-#define ARCH_LOCKDEP_SYS_EXIT			\
-	pushl %eax;				\
-	pushl %ecx;				\
-	pushl %edx;				\
-	call lockdep_sys_exit;			\
-	popl %edx;				\
-	popl %ecx;				\
-	popl %eax;
-
 #define ARCH_LOCKDEP_SYS_EXIT_IRQ
 #endif
 
--- x/arch/x86/lib/thunk_32.S
+++ x/arch/x86/lib/thunk_32.S
@@ -33,6 +33,10 @@
 	THUNK trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1
 #endif
 
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+	THUNK lockdep_sys_exit_thunk,lockdep_sys_exit
+#endif
+
 #ifdef CONFIG_PREEMPT
 	THUNK ___preempt_schedule, preempt_schedule
 #ifdef CONFIG_CONTEXT_TRACKING


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2014-10-28 11:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-21 18:41 [PATCH v3 0/2] x86: reimplement ___preempt_schedule*() using THUNK helpers Oleg Nesterov
2014-09-21 18:41 ` [PATCH v3 1/2] " Oleg Nesterov
2014-09-24 15:02   ` [tip:x86/asm] x86: Speed up ___preempt_schedule*() by " tip-bot for Oleg Nesterov
2014-10-03  4:50     ` Sasha Levin
2014-10-03 13:39       ` Chuck Ebbert
2014-10-03 21:41         ` Oleg Nesterov
2014-10-03 21:56           ` Andy Lutomirski
2014-10-03 23:48             ` Linus Torvalds
2014-10-03 23:51             ` Oleg Nesterov
2014-10-03 22:48           ` Chuck Ebbert
2014-10-03 22:53             ` Andy Lutomirski
2014-10-03 23:13               ` H. Peter Anvin
2014-10-03 23:37             ` Oleg Nesterov
2014-10-03 21:16       ` Oleg Nesterov
2014-10-03 23:26       ` Oleg Nesterov
2014-10-04  0:01         ` Linus Torvalds
2014-10-04  0:11           ` Linus Torvalds
2014-10-04  0:33             ` Oleg Nesterov
2014-10-05 20:23               ` [PATCH 0/1] stop the unbound recursion in preempt_schedule_context() Oleg Nesterov
2014-10-05 20:23                 ` [PATCH 1/1] " Oleg Nesterov
2014-10-28 11:03                   ` [tip:sched/core] sched: " tip-bot for Oleg Nesterov
2014-10-05 23:53                 ` [PATCH 0/1] " Oleg Nesterov
2014-10-04  0:19           ` [tip:x86/asm] x86: Speed up ___preempt_schedule*() by using THUNK helpers Oleg Nesterov
2014-09-21 18:42 ` [PATCH v3 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o" Oleg Nesterov
2014-09-24 15:02   ` [tip:x86/asm] x86/lib/Makefile: Remove " tip-bot for Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.