x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64
Subsystems (2)
PATCH 1/1 x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64
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.
--- arch/x86/entry/calling.h | 31 ------------------------------- 1 file changed, 31 deletions(-)
arch/x86/entry/calling.h +0 -31
@@ -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 */ /*
Signature · 1 line
2.7.0.25.gfc10eb5
Quoted 9 lines · Alexander Kuleshov
SAVE_ALLandRESTORE_ALLmacros for !CONFIG_X86_64 were introduced in the1a338ac32commit (sched, x86: Optimize thepreempt_schedule()call) and were used in the___preempt_scheduleand___preempt_schedule_contextfrom thearch/x86/kernel/preempt.S. But thearch/x86/kernel/preempt.Swas removed in the0ad6e3c5commit (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.
tip-bot for Alexander Kuleshov
merge bot[tip:x86/asm] x86/asm/entry: Remove unused SAVE_ALL/ RESTORE_ALL macros for !CONFIG_x86_64
In reply to Alexander Kuleshovx86/asm/entry: Remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64
Commit-ID: 2024315124b43bb8b25a119ec6c614f0647dcc6d Gitweb: http://git.kernel.org/tip/2024315124b43bb8b25a119ec6c614f0647dcc6d Author: Alexander Kuleshov <[email protected]> AuthorDate: Mon, 18 Jan 2016 20:13:14 +0600 Committer: Ingo Molnar <[email protected]> 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.
--- arch/x86/entry/calling.h | 31 ------------------------------- 1 file changed, 31 deletions(-)
arch/x86/entry/calling.h +0 -31
@@ -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 */ /*