Skip to content

Commit

Permalink
x86: use _ASM_EXTABLE macro in arch/x86/kernel/test_nx.c
Browse files Browse the repository at this point in the history
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: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
H. Peter Anvin authored and Ingo Molnar committed Feb 4, 2008
1 parent a34746b commit 9290909
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions arch/x86/kernel/test_nx.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/sort.h>
#include <asm/uaccess.h>
#include <asm/asm.h>

extern int rodata_test_data;

Expand Down Expand Up @@ -89,16 +90,7 @@ static noinline int test_address(void *address)
"2: mov %[zero], %[rslt]\n"
" ret\n"
".previous\n"
".section __ex_table,\"a\"\n"
" .align 8\n"
#ifdef CONFIG_X86_32
" .long 0b\n"
" .long 2b\n"
#else
" .quad 0b\n"
" .quad 2b\n"
#endif
".previous\n"
_ASM_EXTABLE(0b,2b)
: [rslt] "=r" (result)
: [fake_code] "r" (address), [zero] "r" (0UL), "0" (result)
);
Expand Down

0 comments on commit 9290909

Please sign in to comment.