[PATCH REPOST] [3/3] Replace macro recursion with more conventional loop

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Monday, March 10, 2008 - 6:23 pm

The early exception handlers are currently set up using a macro
recursion. Replace that with a standard loop.

Noop patch, just a cleanup.

Signed-off-by: Andi Kleen <ak@suse.de>

---
 arch/x86/kernel/head_64.S |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

Index: linux/arch/x86/kernel/head_64.S
===================================================================
--- linux.orig/arch/x86/kernel/head_64.S
+++ linux/arch/x86/kernel/head_64.S
@@ -269,18 +269,17 @@ bad_address:
 
 	.section ".init.text","ax"
 #ifdef CONFIG_EARLY_PRINTK
-.macro early_idt_tramp first, last
-	.ifgt \last-\first
-	early_idt_tramp \first, \last-1
-	.endif
-	movl $\last,%esi
+.macro early_idt_tramp i
+	movl $\i,%esi
 	jmp early_idt_handler
 .endm
-
 	.globl early_idt_handlers
 early_idt_handlers:
-	.set maxe,NUM_EXCEPTION_VECTORS-1
-	early_idt_tramp 0,maxe
+	i = 0
+	.rept NUM_EXCEPTION_VECTORS
+	early_idt_tramp i
+	i = i+1
+	.endr
 #endif
 
 ENTRY(early_idt_handler)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH REPOST] [0/3] REPOST: Early exception fixes, Andi Kleen, (Mon Mar 10, 6:23 pm)
[PATCH REPOST] [3/3] Replace macro recursion with more con ..., Andi Kleen, (Mon Mar 10, 6:23 pm)
Re: [PATCH REPOST] [0/3] REPOST: Early exception fixes, Thomas Gleixner, (Tue Mar 11, 2:46 am)