Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311574 > unrolled thread

[PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64

Started byAlexander Kuleshov <kuleshovmail@gmail.com>
First post2016-01-18 15:20 +0100
Last post2016-01-19 14:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64 Alexander Kuleshov <kuleshovmail@gmail.com> - 2016-01-18 15:20 +0100
    Re: [PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros  for !CONFIG_x86_64 Andy Lutomirski <luto@amacapital.net> - 2016-01-18 19:00 +0100
    [tip:x86/asm] x86/asm/entry: Remove unused SAVE_ALL/  RESTORE_ALL macros for !CONFIG_x86_64 tip-bot for Alexander Kuleshov <tipbot@zytor.com> - 2016-01-19 14:40 +0100

#1311574 — [PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64

FromAlexander Kuleshov <kuleshovmail@gmail.com>
Date2016-01-18 15:20 +0100
Subject[PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64
Message-ID<qSiOZ-1Nw-3@gated-at.bofh.it>
SAVE_ALL and RESTORE_ALL macros for !CONFIG_X86_64 were introduced in the
1a338ac32 commit (sched, x86: Optimize the preempt_schedule() call) and
were used in the ___preempt_schedule and ___preempt_schedule_context from
the  arch/x86/kernel/preempt.S. But the arch/x86/kernel/preempt.S was
removed in the 0ad6e3c5 commit (x86: Speed up ___preempt_schedule*() by
using THUNK helpers). The ___preempt_schedule/___preempt_schedule_context
were reimplemeted and not used SAVE_ALL/RESTORE_ALL anymore.

These macros have no users anymore, so we can remove them.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/x86/entry/calling.h | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
index e32206e..9a9e588 100644
--- a/arch/x86/entry/calling.h
+++ b/arch/x86/entry/calling.h
@@ -201,37 +201,6 @@ For 32-bit we have the following conventions - kernel is built with
 	.byte 0xf1
 	.endm
 
-#else /* CONFIG_X86_64 */
-
-/*
- * For 32bit only simplified versions of SAVE_ALL/RESTORE_ALL. These
- * are different from the entry_32.S versions in not changing the segment
- * registers. So only suitable for in kernel use, not when transitioning
- * from or to user space. The resulting stack frame is not a standard
- * pt_regs frame. The main use case is calling C code from assembler
- * when all the registers need to be preserved.
- */
-
-	.macro SAVE_ALL
-	pushl %eax
-	pushl %ebp
-	pushl %edi
-	pushl %esi
-	pushl %edx
-	pushl %ecx
-	pushl %ebx
-	.endm
-
-	.macro RESTORE_ALL
-	popl %ebx
-	popl %ecx
-	popl %edx
-	popl %esi
-	popl %edi
-	popl %ebp
-	popl %eax
-	.endm
-
 #endif /* CONFIG_X86_64 */
 
 /*
-- 
2.7.0.25.gfc10eb5

[toc] | [next] | [standalone]


#1311725 — Re: [PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64

FromAndy Lutomirski <luto@amacapital.net>
Date2016-01-18 19:00 +0100
SubjectRe: [PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64
Message-ID<qSmfU-43l-9@gated-at.bofh.it>
In reply to#1311574
On Mon, Jan 18, 2016 at 6:13 AM, Alexander Kuleshov
<kuleshovmail@gmail.com> wrote:
> SAVE_ALL and RESTORE_ALL macros for !CONFIG_X86_64 were introduced in the
> 1a338ac32 commit (sched, x86: Optimize the preempt_schedule() call) and
> were used in the ___preempt_schedule and ___preempt_schedule_context from
> the  arch/x86/kernel/preempt.S. But the arch/x86/kernel/preempt.S was
> removed in the 0ad6e3c5 commit (x86: Speed up ___preempt_schedule*() by
> using THUNK helpers). The ___preempt_schedule/___preempt_schedule_context
> were reimplemeted and not used SAVE_ALL/RESTORE_ALL anymore.
>
> These macros have no users anymore, so we can remove them.

LGTM.

[toc] | [prev] | [next] | [standalone]


#1312238 — [tip:x86/asm] x86/asm/entry: Remove unused SAVE_ALL/ RESTORE_ALL macros for !CONFIG_x86_64

Fromtip-bot for Alexander Kuleshov <tipbot@zytor.com>
Date2016-01-19 14:40 +0100
Subject[tip:x86/asm] x86/asm/entry: Remove unused SAVE_ALL/ RESTORE_ALL macros for !CONFIG_x86_64
Message-ID<qSEFR-4S-39@gated-at.bofh.it>
In reply to#1311574
Commit-ID:  2024315124b43bb8b25a119ec6c614f0647dcc6d
Gitweb:     http://git.kernel.org/tip/2024315124b43bb8b25a119ec6c614f0647dcc6d
Author:     Alexander Kuleshov <kuleshovmail@gmail.com>
AuthorDate: Mon, 18 Jan 2016 20:13:14 +0600
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 19 Jan 2016 08:24:03 +0100

x86/asm/entry: Remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64

SAVE_ALL and RESTORE_ALL macros for !CONFIG_X86_64 were
introduced in commit:

  1a338ac32 commit ('sched, x86: Optimize the preempt_schedule() call')

... and were used in the ___preempt_schedule() and ___preempt_schedule_context()
functions from the arch/x86/kernel/preempt.S.

But the arch/x86/kernel/preempt.S file was removed in the following commit:

  0ad6e3c5 commit ('x86: Speed up ___preempt_schedule*() by using THUNK helpers')

The ___preempt_schedule()/___preempt_schedule_context() functions were
reimplemeted and do not use SAVE_ALL/RESTORE_ALL anymore.

These macros have no users anymore, so we can remove them.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1453126394-13717-1-git-send-email-kuleshovmail@gmail.com
[ Improved the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/entry/calling.h | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h
index e32206e..9a9e588 100644
--- a/arch/x86/entry/calling.h
+++ b/arch/x86/entry/calling.h
@@ -201,37 +201,6 @@ For 32-bit we have the following conventions - kernel is built with
 	.byte 0xf1
 	.endm
 
-#else /* CONFIG_X86_64 */
-
-/*
- * For 32bit only simplified versions of SAVE_ALL/RESTORE_ALL. These
- * are different from the entry_32.S versions in not changing the segment
- * registers. So only suitable for in kernel use, not when transitioning
- * from or to user space. The resulting stack frame is not a standard
- * pt_regs frame. The main use case is calling C code from assembler
- * when all the registers need to be preserved.
- */
-
-	.macro SAVE_ALL
-	pushl %eax
-	pushl %ebp
-	pushl %edi
-	pushl %esi
-	pushl %edx
-	pushl %ecx
-	pushl %ebx
-	.endm
-
-	.macro RESTORE_ALL
-	popl %ebx
-	popl %ecx
-	popl %edx
-	popl %esi
-	popl %edi
-	popl %ebp
-	popl %eax
-	.endm
-
 #endif /* CONFIG_X86_64 */
 
 /*

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web