Commit e7a40d26 authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Ingo Molnar

x86: use _ASM_EXTABLE macro in arch/x86/lib/mmx_32.c

Use the _ASM_EXTABLE macro from <asm/asm.h>, instead of open-coding
__ex_table entires in arch/x86/lib/mmx_32.c.
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 92909098
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm/asm.h>
#include <asm/i387.h> #include <asm/i387.h>
...@@ -50,10 +51,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len) ...@@ -50,10 +51,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
"3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */
" jmp 2b\n" " jmp 2b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(1b,3b)
" .align 4\n"
" .long 1b, 3b\n"
".previous"
: : "r" (from) ); : : "r" (from) );
...@@ -81,10 +79,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len) ...@@ -81,10 +79,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len)
"3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */
" jmp 2b\n" " jmp 2b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(1b,3b)
" .align 4\n"
" .long 1b, 3b\n"
".previous"
: : "r" (from), "r" (to) : "memory"); : : "r" (from), "r" (to) : "memory");
from+=64; from+=64;
to+=64; to+=64;
...@@ -181,10 +176,7 @@ static void fast_copy_page(void *to, void *from) ...@@ -181,10 +176,7 @@ static void fast_copy_page(void *to, void *from)
"3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */
" jmp 2b\n" " jmp 2b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(1b,3b)
" .align 4\n"
" .long 1b, 3b\n"
".previous"
: : "r" (from) ); : : "r" (from) );
for(i=0; i<(4096-320)/64; i++) for(i=0; i<(4096-320)/64; i++)
...@@ -211,10 +203,7 @@ static void fast_copy_page(void *to, void *from) ...@@ -211,10 +203,7 @@ static void fast_copy_page(void *to, void *from)
"3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */
" jmp 2b\n" " jmp 2b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(1b,3b)
" .align 4\n"
" .long 1b, 3b\n"
".previous"
: : "r" (from), "r" (to) : "memory"); : : "r" (from), "r" (to) : "memory");
from+=64; from+=64;
to+=64; to+=64;
...@@ -311,10 +300,7 @@ static void fast_copy_page(void *to, void *from) ...@@ -311,10 +300,7 @@ static void fast_copy_page(void *to, void *from)
"3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */
" jmp 2b\n" " jmp 2b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(1b,3b)
" .align 4\n"
" .long 1b, 3b\n"
".previous"
: : "r" (from) ); : : "r" (from) );
for(i=0; i<4096/64; i++) for(i=0; i<4096/64; i++)
...@@ -341,10 +327,7 @@ static void fast_copy_page(void *to, void *from) ...@@ -341,10 +327,7 @@ static void fast_copy_page(void *to, void *from)
"3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */
" jmp 2b\n" " jmp 2b\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(1b,3b)
" .align 4\n"
" .long 1b, 3b\n"
".previous"
: : "r" (from), "r" (to) : "memory"); : : "r" (from), "r" (to) : "memory");
from+=64; from+=64;
to+=64; to+=64;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment