summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/alternative-asm.h
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@mit.edu>2011-07-13 15:24:10 +0200
committerH. Peter Anvin <hpa@linux.intel.com>2011-07-13 20:22:56 +0200
commit59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93 (patch)
tree015fd8e63e1fcd8fdf7a066bd2e09a5636a14449 /arch/x86/include/asm/alternative-asm.h
parentx86-64: Improve vsyscall emulation CS and RIP handling (diff)
downloadlinux-59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93.tar.xz
linux-59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93.zip
x86: Make alternative instruction pointers relative
This save a few bytes on x86-64 and means that future patches can apply alternatives to unrelocated code. Signed-off-by: Andy Lutomirski <luto@mit.edu> Link: http://lkml.kernel.org/r/ff64a6b9a1a3860ca4a7b8b6dc7b4754f9491cd7.1310563276.git.luto@mit.edu Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm/alternative-asm.h')
-rw-r--r--arch/x86/include/asm/alternative-asm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h
index 94d420b360d1..4554cc6fb96a 100644
--- a/arch/x86/include/asm/alternative-asm.h
+++ b/arch/x86/include/asm/alternative-asm.h
@@ -17,8 +17,8 @@
.macro altinstruction_entry orig alt feature orig_len alt_len
.align 8
- .quad \orig
- .quad \alt
+ .long \orig - .
+ .long \alt - .
.word \feature
.byte \orig_len
.byte \alt_len