x86-64: reduce SMP locks table size
PATCH 1/1 x86-64: reduce SMP locks table size
... by using relative pointers instead of absolute ones, thus cutting the table size by half.
Signed-off-by Jan Beulich <[email protected]>
--- arch/x86/include/asm/alternative-asm.h | 4 +- arch/x86/include/asm/alternative.h | 4 +- arch/x86/kernel/alternative.c | 45 ++++++++++++++++++--------------- 3 files changed, 29 insertions(+), 24 deletions(-)
arch/x86/include/asm/alternative-asm.h +2 -2
@@ -6,8 +6,8 @@ .macro LOCK_PREFIX 1: lock .section .smp_locks,"a" - _ASM_ALIGN - _ASM_PTR 1b + .balign 4 + .long 1b - . .previous .endm#else
arch/x86/include/asm/alternative.h +2 -2
@@ -30,8 +30,8 @@#ifdef CONFIG_SMP #define LOCK_PREFIX \ ".section .smp_locks,\"a\"\n" \ - _ASM_ALIGN "\n" \ - _ASM_PTR "661f\n"/* address */ \ + ".balign 4\n" \ + ".long 661f - .\n"/* offset */ \".previous\n" \"661:\n\tlock; "
arch/x86/kernel/alternative.c +25 -20
93 lines not on this page · raw message
H. Peter Anvin
reviewerQuoted 4 lines · Jan Beulich
... by using relative pointers instead of absolute ones, thus cutting the table size by half.
Signed-off-by Jan Beulich <[email protected]>
We probably could use something like this for the alternatives and exceptions tables, too...
-hpa
[tip:x86/asm] x86-64: Reduce SMP locks table size
In reply to Jan BeulichCommit-ID: 5967ed87ade85a421ef814296c3c7f182b08c225 Gitweb: http://git.kernel.org/tip/5967ed87ade85a421ef814296c3c7f182b08c225 Author: Jan Beulich <[email protected]> AuthorDate: Wed, 21 Apr 2010 16:08:14 +0100 Committer: H. Peter Anvin <[email protected]> CommitDate: Wed, 28 Apr 2010 17:15:47 -0700
x86-64: Reduce SMP locks table size
Reduce the SMP locks table size by using relative pointers instead of absolute ones, thus cutting the table size by half.
Signed-off-by Jan Beulich <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by H. Peter Anvin <[email protected]>
--- arch/x86/include/asm/alternative-asm.h | 4 +- arch/x86/include/asm/alternative.h | 4 +- arch/x86/kernel/alternative.c | 45 +++++++++++++++++-------------- 3 files changed, 29 insertions(+), 24 deletions(-)
arch/x86/include/asm/alternative-asm.h +2 -2
@@ -6,8 +6,8 @@ .macro LOCK_PREFIX 1: lock .section .smp_locks,"a" - _ASM_ALIGN - _ASM_PTR 1b + .balign 4 + .long 1b - . .previous .endm#else
arch/x86/include/asm/alternative.h +2 -2
@@ -30,8 +30,8 @@#ifdef CONFIG_SMP #define LOCK_PREFIX \ ".section .smp_locks,\"a\"\n" \ - _ASM_ALIGN "\n" \ - _ASM_PTR "661f\n"/* address */ \ + ".balign 4\n" \ + ".long 661f - .\n"/* offset */ \".previous\n" \"661:\n\tlock; "
arch/x86/kernel/alternative.c +25 -20
93 lines not on this page · raw message