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

x86: use _ASM_EXTABLE macro in arch/x86/kernel/test_nx.c

Use the _ASM_EXTABLE macro from <asm/asm.h>, instead of open-coding
__ex_table entires in arch/x86/kernel/test_nx.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 a34746bc
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/sort.h> #include <linux/sort.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/asm.h>
extern int rodata_test_data; extern int rodata_test_data;
...@@ -89,16 +90,7 @@ static noinline int test_address(void *address) ...@@ -89,16 +90,7 @@ static noinline int test_address(void *address)
"2: mov %[zero], %[rslt]\n" "2: mov %[zero], %[rslt]\n"
" ret\n" " ret\n"
".previous\n" ".previous\n"
".section __ex_table,\"a\"\n" _ASM_EXTABLE(0b,2b)
" .align 8\n"
#ifdef CONFIG_X86_32
" .long 0b\n"
" .long 2b\n"
#else
" .quad 0b\n"
" .quad 2b\n"
#endif
".previous\n"
: [rslt] "=r" (result) : [rslt] "=r" (result)
: [fake_code] "r" (address), [zero] "r" (0UL), "0" (result) : [fake_code] "r" (address), [zero] "r" (0UL), "0" (result)
); );
......
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