[PATCH 1/2] x86: duplicated code cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- no changes at all, just move duplicated code to macro expression.

Signed-off-by: Dmitry Monakhov <[email protected]>
---
 arch/i386/kernel/entry.S |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index a714d6b..0993810 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -183,6 +183,12 @@ VM_MASK		= 0x00020000
 	.long 3b,6b;	\
 .popsection
 
+#define IRET_EXC		\
+.section __ex_table,"a";	\
+	.align 4;		\
+	.long 1b,iret_exc;	\
+.previous
+
 #define RING0_INT_FRAME \
 	CFI_STARTPROC simple;\
 	CFI_SIGNAL_FRAME;\
@@ -413,10 +419,7 @@ iret_exc:
 	pushl $do_iret_error
 	jmp error_code
 .previous
-.section __ex_table,"a"
-	.align 4
-	.long 1b,iret_exc
-.previous
+IRET_EXC
 
 	CFI_RESTORE_STATE
 ldt_ss:
@@ -863,19 +866,13 @@ nmi_espfix_stack:
 	CFI_ADJUST_CFA_OFFSET -24
 1:	INTERRUPT_RETURN
 	CFI_ENDPROC
-.section __ex_table,"a"
-	.align 4
-	.long 1b,iret_exc
-.previous
+IRET_EXC
 KPROBE_END(nmi)
 
 #ifdef CONFIG_PARAVIRT
 ENTRY(native_iret)
 1:	iret
-.section __ex_table,"a"
-	.align 4
-	.long 1b,iret_exc
-.previous
+IRET_EXC
 END(native_iret)
 
 ENTRY(native_irq_enable_sysexit)
-- 
1.5.2.2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux