[PATCH] i386, entry_32: remove page_fault microoptimization

From: Alexander van Heukelum
Date: Wed May 20 2009 - 19:18:42 EST


A distinct pattern exists in the handler stubs for traps. The
pagefault handler has a microoptimization where the handler
falls through to the common handler code 'error_code'. This
adds a short jump to the pagefault handler and aligns the
error_code code.

No functional change intended.

impact: prepare for introduction of zeroentry/errorentry macros

Signed-off-by: Alexander van Heukelum <heukelum@xxxxxxxxxxx>
---
arch/x86/kernel/entry_32.S | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index 0e8ac16..3c04063 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1178,8 +1178,13 @@ ENTRY(page_fault)
RING0_EC_FRAME
pushl $do_page_fault
CFI_ADJUST_CFA_OFFSET 4
- ALIGN
-error_code:
+ jmp error_code
+ CFI_ENDPROC
+END(page_fault)
+
+ENTRY(error_code)
+ RING0_EC_FRAME
+ CFI_ADJUST_CFA_OFFSET 4
/* the function address is in %gs's slot on the stack */
pushl %fs
CFI_ADJUST_CFA_OFFSET 4
@@ -1229,7 +1234,7 @@ error_code:
call *%edi
jmp ret_from_exception
CFI_ENDPROC
-END(page_fault)
+END(error_code)

/*
* Debug traps and NMI can happen at the one SYSENTER instruction
--
1.6.0.4

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