Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Kuleshov and committed by
Ingo Molnar
20243151 bd902c53

-31
-31
arch/x86/entry/calling.h
··· 201 201 .byte 0xf1 202 202 .endm 203 203 204 - #else /* CONFIG_X86_64 */ 205 - 206 - /* 207 - * For 32bit only simplified versions of SAVE_ALL/RESTORE_ALL. These 208 - * are different from the entry_32.S versions in not changing the segment 209 - * registers. So only suitable for in kernel use, not when transitioning 210 - * from or to user space. The resulting stack frame is not a standard 211 - * pt_regs frame. The main use case is calling C code from assembler 212 - * when all the registers need to be preserved. 213 - */ 214 - 215 - .macro SAVE_ALL 216 - pushl %eax 217 - pushl %ebp 218 - pushl %edi 219 - pushl %esi 220 - pushl %edx 221 - pushl %ecx 222 - pushl %ebx 223 - .endm 224 - 225 - .macro RESTORE_ALL 226 - popl %ebx 227 - popl %ecx 228 - popl %edx 229 - popl %esi 230 - popl %edi 231 - popl %ebp 232 - popl %eax 233 - .endm 234 - 235 204 #endif /* CONFIG_X86_64 */ 236 205 237 206 /*