From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755288AbcAROQr (ORCPT ); Mon, 18 Jan 2016 09:16:47 -0500 Received: from mail-lb0-f173.google.com ([209.85.217.173]:33699 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755037AbcAROQp (ORCPT ); Mon, 18 Jan 2016 09:16:45 -0500 From: Alexander Kuleshov To: Thomas Gleixner Cc: Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, Andy Lutomirski , Denys Vlasenko , Borislav Petkov , linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [PATCH] x86/calling.h: remove unused SAVE_ALL/RESTORE_ALL macros for !CONFIG_x86_64 Date: Mon, 18 Jan 2016 20:13:14 +0600 Message-Id: <1453126394-13717-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.7.0.25.gfc10eb5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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