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

Peter, please consider this (hopefully simple) change for inclusion.

Denys, Andy, could you review?

I guess (I hope ;) Denys is going to resend his entry.S/etc rework, but
this change should not conflict with his work, just preempt.S goes away.

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(-)


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

* [PATCH 1/2] x86: reimplement ___preempt_schedule*() using THUNK helpers
  2014-09-04 13:41 [PATCH 0/2] x86: reimplement ___preempt_schedule*() using THUNK helpers Oleg Nesterov
@ 2014-09-04 13:42 ` Oleg Nesterov
  2014-09-04 16:51   ` Denys Vlasenko
                     ` (2 more replies)
  2014-09-04 13:42 ` [PATCH 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o" Oleg Nesterov
  1 sibling, 3 replies; 8+ messages in thread
From: Oleg Nesterov @ 2014-09-04 13:42 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Andy Lutomirski, Denys Vlasenko, Ingo Molnar, Peter Zijlstra,
	x86, linux-kernel

___preempt_schedule() does SAVE_ALL/RESTORE_ALL but this is suboptimal,
we do not need to save/restore the callee-saved register. And we already
have arch/x86/lib/thunk_*.S which implements the similar asm wrappers,
so it makes sense to redefine ___preempt_schedule() as "THUNK ..." and
remove preempt.S altogether.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 arch/x86/kernel/Makefile  |    2 --
 arch/x86/kernel/preempt.S |   25 -------------------------
 arch/x86/lib/thunk_32.S   |   20 ++++++++++++++++----
 arch/x86/lib/thunk_64.S   |    7 +++++++
 4 files changed, 23 insertions(+), 31 deletions(-)
 delete mode 100644 arch/x86/kernel/preempt.S

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index b5ea75c..58cf60b 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -39,8 +39,6 @@ obj-y			+= tsc.o tsc_msr.o io_delay.o rtc.o
 obj-y			+= pci-iommu_table.o
 obj-y			+= resource.o
 
-obj-$(CONFIG_PREEMPT)	+= preempt.o
-
 obj-y				+= process.o
 obj-y				+= i387.o xsave.o
 obj-y				+= ptrace.o
diff --git a/arch/x86/kernel/preempt.S b/arch/x86/kernel/preempt.S
deleted file mode 100644
index ca7f0d5..0000000
--- a/arch/x86/kernel/preempt.S
+++ /dev/null
@@ -1,25 +0,0 @@
-
-#include <linux/linkage.h>
-#include <asm/dwarf2.h>
-#include <asm/asm.h>
-#include <asm/calling.h>
-
-ENTRY(___preempt_schedule)
-	CFI_STARTPROC
-	SAVE_ALL
-	call preempt_schedule
-	RESTORE_ALL
-	ret
-	CFI_ENDPROC
-
-#ifdef CONFIG_CONTEXT_TRACKING
-
-ENTRY(___preempt_schedule_context)
-	CFI_STARTPROC
-	SAVE_ALL
-	call preempt_schedule_context
-	RESTORE_ALL
-	ret
-	CFI_ENDPROC
-
-#endif
diff --git a/arch/x86/lib/thunk_32.S b/arch/x86/lib/thunk_32.S
index 28f85c9..7f1641a 100644
--- a/arch/x86/lib/thunk_32.S
+++ b/arch/x86/lib/thunk_32.S
@@ -7,16 +7,19 @@
 	#include <linux/linkage.h>
 	#include <asm/asm.h>
 
-#ifdef CONFIG_TRACE_IRQFLAGS
 	/* put return address in eax (arg1) */
-	.macro thunk_ra name,func
+	.macro thunk_ra 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
@@ -25,6 +28,15 @@
 	_ASM_NOKPROBE(\name)
 	.endm
 
-	thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller
-	thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller
+#ifdef CONFIG_TRACE_IRQFLAGS
+	thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1
+	thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1
+#endif
+
+#ifdef CONFIG_PREEMPT
+	THUNK ___preempt_schedule, preempt_schedule
+#ifdef CONFIG_CONTEXT_TRACKING
+	THUNK ___preempt_schedule_context, preempt_schedule_context
 #endif
+#endif
+
diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S
index 92d9fea..b30b5eb 100644
--- a/arch/x86/lib/thunk_64.S
+++ b/arch/x86/lib/thunk_64.S
@@ -38,6 +38,13 @@
 	THUNK lockdep_sys_exit_thunk,lockdep_sys_exit
 #endif
 
+#ifdef CONFIG_PREEMPT
+	THUNK ___preempt_schedule, preempt_schedule
+#ifdef CONFIG_CONTEXT_TRACKING
+	THUNK ___preempt_schedule_context, preempt_schedule_context
+#endif
+#endif
+
 	/* SAVE_ARGS below is used only for the .cfi directives it contains. */
 	CFI_STARTPROC
 	SAVE_ARGS
-- 
1.5.5.1



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

* [PATCH 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o"
  2014-09-04 13:41 [PATCH 0/2] x86: reimplement ___preempt_schedule*() using THUNK helpers Oleg Nesterov
  2014-09-04 13:42 ` [PATCH 1/2] " Oleg Nesterov
@ 2014-09-04 13:42 ` Oleg Nesterov
  2014-09-04 18:09   ` Andy Lutomirski
  1 sibling, 1 reply; 8+ messages in thread
From: Oleg Nesterov @ 2014-09-04 13:42 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Andy Lutomirski, Denys Vlasenko, Ingo Molnar, Peter Zijlstra,
	x86, linux-kernel

Trivial. We have "lib-y += thunk_$(BITS).o" at the start, no need
to add thunk_64.o if !CONFIG_X86_32.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 arch/x86/lib/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 4d4f96a..66127b9 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -39,7 +39,7 @@ endif
 else
         obj-y += iomap_copy_64.o
         lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
-        lib-y += thunk_64.o clear_page_64.o copy_page_64.o
+        lib-y += clear_page_64.o copy_page_64.o
         lib-y += memmove_64.o memset_64.o
         lib-y += copy_user_64.o copy_user_nocache_64.o
 	lib-y += cmpxchg16b_emu.o
-- 
1.5.5.1



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

* Re: [PATCH 1/2] x86: reimplement ___preempt_schedule*() using THUNK helpers
  2014-09-04 13:42 ` [PATCH 1/2] " Oleg Nesterov
@ 2014-09-04 16:51   ` Denys Vlasenko
  2014-09-04 17:11     ` Oleg Nesterov
  2014-09-04 17:12   ` [PATCH v2 " Oleg Nesterov
  2014-09-05  0:37   ` [PATCH " Andy Lutomirski
  2 siblings, 1 reply; 8+ messages in thread
From: Denys Vlasenko @ 2014-09-04 16:51 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: H. Peter Anvin, Andy Lutomirski, Denys Vlasenko, Ingo Molnar,
	Peter Zijlstra, X86 ML, Linux Kernel Mailing List

On Thu, Sep 4, 2014 at 3:42 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> -#ifdef CONFIG_TRACE_IRQFLAGS
>         /* put return address in eax (arg1) */
> -       .macro thunk_ra name,func
> +       .macro thunk_ra 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
> @@ -25,6 +28,15 @@
>         _ASM_NOKPROBE(\name)
>         .endm
>
> -       thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller
> -       thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller
> +#ifdef CONFIG_TRACE_IRQFLAGS
> +       thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1
> +       thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1
> +#endif
> +
> +#ifdef CONFIG_PREEMPT
> +       THUNK ___preempt_schedule, preempt_schedule
> +#ifdef CONFIG_CONTEXT_TRACKING
> +       THUNK ___preempt_schedule_context, preempt_schedule_context
>  #endif
> +#endif


I think THUNK should be thunk_ra here;
or thunk_ra should be renamed to THUNK (like it is in thunk_64.S)

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

* Re: [PATCH 1/2] x86: reimplement ___preempt_schedule*() using THUNK helpers
  2014-09-04 16:51   ` Denys Vlasenko
@ 2014-09-04 17:11     ` Oleg Nesterov
  0 siblings, 0 replies; 8+ messages in thread
From: Oleg Nesterov @ 2014-09-04 17:11 UTC (permalink / raw)
  To: Denys Vlasenko
  Cc: H. Peter Anvin, Andy Lutomirski, Denys Vlasenko, Ingo Molnar,
	Peter Zijlstra, X86 ML, Linux Kernel Mailing List

On 09/04, Denys Vlasenko wrote:
>
> or thunk_ra should be renamed to THUNK (like it is in thunk_64.S)

Of course! Thanks a lot Denys.

Oleg.


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

* [PATCH v2 1/2] x86: reimplement ___preempt_schedule*() using THUNK helpers
  2014-09-04 13:42 ` [PATCH 1/2] " Oleg Nesterov
  2014-09-04 16:51   ` Denys Vlasenko
@ 2014-09-04 17:12   ` Oleg Nesterov
  2014-09-05  0:37   ` [PATCH " Andy Lutomirski
  2 siblings, 0 replies; 8+ messages in thread
From: Oleg Nesterov @ 2014-09-04 17:12 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Andy Lutomirski, Denys Vlasenko, Ingo Molnar, Peter Zijlstra,
	x86, linux-kernel

___preempt_schedule() does SAVE_ALL/RESTORE_ALL but this is suboptimal,
we do not need to save/restore the callee-saved register. And we already
have arch/x86/lib/thunk_*.S which implements the similar asm wrappers,
so it makes sense to redefine ___preempt_schedule() as "THUNK ..." and
remove preempt.S altogether.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 arch/x86/kernel/Makefile  |    2 --
 arch/x86/kernel/preempt.S |   25 -------------------------
 arch/x86/lib/thunk_32.S   |   20 ++++++++++++++++----
 arch/x86/lib/thunk_64.S   |    7 +++++++
 4 files changed, 23 insertions(+), 31 deletions(-)
 delete mode 100644 arch/x86/kernel/preempt.S

diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index b5ea75c..58cf60b 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -39,8 +39,6 @@ obj-y			+= tsc.o tsc_msr.o io_delay.o rtc.o
 obj-y			+= pci-iommu_table.o
 obj-y			+= resource.o
 
-obj-$(CONFIG_PREEMPT)	+= preempt.o
-
 obj-y				+= process.o
 obj-y				+= i387.o xsave.o
 obj-y				+= ptrace.o
diff --git a/arch/x86/kernel/preempt.S b/arch/x86/kernel/preempt.S
deleted file mode 100644
index ca7f0d5..0000000
--- a/arch/x86/kernel/preempt.S
+++ /dev/null
@@ -1,25 +0,0 @@
-
-#include <linux/linkage.h>
-#include <asm/dwarf2.h>
-#include <asm/asm.h>
-#include <asm/calling.h>
-
-ENTRY(___preempt_schedule)
-	CFI_STARTPROC
-	SAVE_ALL
-	call preempt_schedule
-	RESTORE_ALL
-	ret
-	CFI_ENDPROC
-
-#ifdef CONFIG_CONTEXT_TRACKING
-
-ENTRY(___preempt_schedule_context)
-	CFI_STARTPROC
-	SAVE_ALL
-	call preempt_schedule_context
-	RESTORE_ALL
-	ret
-	CFI_ENDPROC
-
-#endif
diff --git a/arch/x86/lib/thunk_32.S b/arch/x86/lib/thunk_32.S
index 28f85c9..e9acf5f 100644
--- a/arch/x86/lib/thunk_32.S
+++ b/arch/x86/lib/thunk_32.S
@@ -7,16 +7,19 @@
 	#include <linux/linkage.h>
 	#include <asm/asm.h>
 
-#ifdef CONFIG_TRACE_IRQFLAGS
 	/* put return address in eax (arg1) */
-	.macro thunk_ra name,func
+	.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
@@ -25,6 +28,15 @@
 	_ASM_NOKPROBE(\name)
 	.endm
 
-	thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller
-	thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller
+#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_PREEMPT
+	THUNK ___preempt_schedule, preempt_schedule
+#ifdef CONFIG_CONTEXT_TRACKING
+	THUNK ___preempt_schedule_context, preempt_schedule_context
 #endif
+#endif
+
diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S
index 92d9fea..b30b5eb 100644
--- a/arch/x86/lib/thunk_64.S
+++ b/arch/x86/lib/thunk_64.S
@@ -38,6 +38,13 @@
 	THUNK lockdep_sys_exit_thunk,lockdep_sys_exit
 #endif
 
+#ifdef CONFIG_PREEMPT
+	THUNK ___preempt_schedule, preempt_schedule
+#ifdef CONFIG_CONTEXT_TRACKING
+	THUNK ___preempt_schedule_context, preempt_schedule_context
+#endif
+#endif
+
 	/* SAVE_ARGS below is used only for the .cfi directives it contains. */
 	CFI_STARTPROC
 	SAVE_ARGS
-- 
1.5.5.1



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

* Re: [PATCH 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o"
  2014-09-04 13:42 ` [PATCH 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o" Oleg Nesterov
@ 2014-09-04 18:09   ` Andy Lutomirski
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Lutomirski @ 2014-09-04 18:09 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: H. Peter Anvin, Denys Vlasenko, Ingo Molnar, Peter Zijlstra,
	X86 ML, linux-kernel

On Thu, Sep 4, 2014 at 6:42 AM, Oleg Nesterov <oleg@redhat.com> wrote:
> Trivial. We have "lib-y += thunk_$(BITS).o" at the start, no need
> to add thunk_64.o if !CONFIG_X86_32.
>

Acked-by: Andy Lutomirski <luto@amacapital.net>

> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
>  arch/x86/lib/Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
> index 4d4f96a..66127b9 100644
> --- a/arch/x86/lib/Makefile
> +++ b/arch/x86/lib/Makefile
> @@ -39,7 +39,7 @@ endif
>  else
>          obj-y += iomap_copy_64.o
>          lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
> -        lib-y += thunk_64.o clear_page_64.o copy_page_64.o
> +        lib-y += clear_page_64.o copy_page_64.o
>          lib-y += memmove_64.o memset_64.o
>          lib-y += copy_user_64.o copy_user_nocache_64.o
>         lib-y += cmpxchg16b_emu.o
> --
> 1.5.5.1
>
>



-- 
Andy Lutomirski
AMA Capital Management, LLC

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

* Re: [PATCH 1/2] x86: reimplement ___preempt_schedule*() using THUNK helpers
  2014-09-04 13:42 ` [PATCH 1/2] " Oleg Nesterov
  2014-09-04 16:51   ` Denys Vlasenko
  2014-09-04 17:12   ` [PATCH v2 " Oleg Nesterov
@ 2014-09-05  0:37   ` Andy Lutomirski
  2 siblings, 0 replies; 8+ messages in thread
From: Andy Lutomirski @ 2014-09-05  0:37 UTC (permalink / raw)
  To: Oleg Nesterov
  Cc: H. Peter Anvin, Denys Vlasenko, Ingo Molnar, Peter Zijlstra,
	X86 ML, linux-kernel

On Thu, Sep 4, 2014 at 6:42 AM, Oleg Nesterov <oleg@redhat.com> wrote:
>
> ___preempt_schedule() does SAVE_ALL/RESTORE_ALL but this is suboptimal,
> we do not need to save/restore the callee-saved register. And we already
> have arch/x86/lib/thunk_*.S which implements the similar asm wrappers,
> so it makes sense to redefine ___preempt_schedule() as "THUNK ..." and
> remove preempt.S altogether.

Reviewed-by: Andy Lutomirski <luto@amacapital.net>

>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> ---
>  arch/x86/kernel/Makefile  |    2 --
>  arch/x86/kernel/preempt.S |   25 -------------------------
>  arch/x86/lib/thunk_32.S   |   20 ++++++++++++++++----
>  arch/x86/lib/thunk_64.S   |    7 +++++++
>  4 files changed, 23 insertions(+), 31 deletions(-)
>  delete mode 100644 arch/x86/kernel/preempt.S
>
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index b5ea75c..58cf60b 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -39,8 +39,6 @@ obj-y                 += tsc.o tsc_msr.o io_delay.o rtc.o
>  obj-y                  += pci-iommu_table.o
>  obj-y                  += resource.o
>
> -obj-$(CONFIG_PREEMPT)  += preempt.o
> -
>  obj-y                          += process.o
>  obj-y                          += i387.o xsave.o
>  obj-y                          += ptrace.o
> diff --git a/arch/x86/kernel/preempt.S b/arch/x86/kernel/preempt.S
> deleted file mode 100644
> index ca7f0d5..0000000
> --- a/arch/x86/kernel/preempt.S
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -
> -#include <linux/linkage.h>
> -#include <asm/dwarf2.h>
> -#include <asm/asm.h>
> -#include <asm/calling.h>
> -
> -ENTRY(___preempt_schedule)
> -       CFI_STARTPROC
> -       SAVE_ALL
> -       call preempt_schedule
> -       RESTORE_ALL
> -       ret
> -       CFI_ENDPROC
> -
> -#ifdef CONFIG_CONTEXT_TRACKING
> -
> -ENTRY(___preempt_schedule_context)
> -       CFI_STARTPROC
> -       SAVE_ALL
> -       call preempt_schedule_context
> -       RESTORE_ALL
> -       ret
> -       CFI_ENDPROC
> -
> -#endif
> diff --git a/arch/x86/lib/thunk_32.S b/arch/x86/lib/thunk_32.S
> index 28f85c9..7f1641a 100644
> --- a/arch/x86/lib/thunk_32.S
> +++ b/arch/x86/lib/thunk_32.S
> @@ -7,16 +7,19 @@
>         #include <linux/linkage.h>
>         #include <asm/asm.h>
>
> -#ifdef CONFIG_TRACE_IRQFLAGS
>         /* put return address in eax (arg1) */
> -       .macro thunk_ra name,func
> +       .macro thunk_ra 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
> @@ -25,6 +28,15 @@
>         _ASM_NOKPROBE(\name)
>         .endm
>
> -       thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller
> -       thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller
> +#ifdef CONFIG_TRACE_IRQFLAGS
> +       thunk_ra trace_hardirqs_on_thunk,trace_hardirqs_on_caller,1
> +       thunk_ra trace_hardirqs_off_thunk,trace_hardirqs_off_caller,1
> +#endif
> +
> +#ifdef CONFIG_PREEMPT
> +       THUNK ___preempt_schedule, preempt_schedule
> +#ifdef CONFIG_CONTEXT_TRACKING
> +       THUNK ___preempt_schedule_context, preempt_schedule_context
>  #endif
> +#endif
> +
> diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S
> index 92d9fea..b30b5eb 100644
> --- a/arch/x86/lib/thunk_64.S
> +++ b/arch/x86/lib/thunk_64.S
> @@ -38,6 +38,13 @@
>         THUNK lockdep_sys_exit_thunk,lockdep_sys_exit
>  #endif
>
> +#ifdef CONFIG_PREEMPT
> +       THUNK ___preempt_schedule, preempt_schedule
> +#ifdef CONFIG_CONTEXT_TRACKING
> +       THUNK ___preempt_schedule_context, preempt_schedule_context
> +#endif
> +#endif
> +
>         /* SAVE_ARGS below is used only for the .cfi directives it contains. */
>         CFI_STARTPROC
>         SAVE_ARGS
> --
> 1.5.5.1
>
>



-- 
Andy Lutomirski
AMA Capital Management, LLC

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

end of thread, other threads:[~2014-09-05  0:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 13:41 [PATCH 0/2] x86: reimplement ___preempt_schedule*() using THUNK helpers Oleg Nesterov
2014-09-04 13:42 ` [PATCH 1/2] " Oleg Nesterov
2014-09-04 16:51   ` Denys Vlasenko
2014-09-04 17:11     ` Oleg Nesterov
2014-09-04 17:12   ` [PATCH v2 " Oleg Nesterov
2014-09-05  0:37   ` [PATCH " Andy Lutomirski
2014-09-04 13:42 ` [PATCH 2/2] x86, lib/Makefile: remove the unnecessary "+= thunk_64.o" Oleg Nesterov
2014-09-04 18:09   ` Andy Lutomirski

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.