mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Linux-Kernel@vger.kernel.org
Cc: hpa@zytor.com
Subject: [PATCH 1/2] x86: duplicated code cleanup
Date: Sun, 22 Jul 2007 16:49:52 +0400	[thread overview]
Message-ID: <20070722124952.GA20538@dnb.sw.ru> (raw)

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

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 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



                 reply	other threads:[~2007-07-22 12:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070722124952.GA20538@dnb.sw.ru \
    --to=dmonakhov@openvz.org \
    --cc=Linux-Kernel@vger.kernel.org \
    --cc=hpa@zytor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®