summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/alternative-asm.h
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@mit.edu>2011-07-13 13:24:10 (GMT)
committerH. Peter Anvin <hpa@linux.intel.com>2011-07-13 18:22:56 (GMT)
commit59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93 (patch)
tree015fd8e63e1fcd8fdf7a066bd2e09a5636a14449 /arch/x86/include/asm/alternative-asm.h
parentc9712944b2a12373cb6ff8059afcfb7e826a6c54 (diff)
downloadlinux-fsl-qoriq-59e97e4d6fbcd5b74a94cb48bcbfc6f8478a5e93.tar.xz
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 94d420b..4554cc6 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