Skip to content

Commit

Permalink
[S390] bug: use relative pointers in bug table entries
Browse files Browse the repository at this point in the history
Reduces the size of the bug table entries by 50% on 64bit kernels.
Saves around 30kb on a defconfig kernel.
s390 version of b93a531 "allow bug table entries to use relative
pointers (and use it on x86-64)".

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Feb 26, 2010
1 parent cbb870c commit 52499f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 3 additions & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ config GENERIC_BUG
depends on BUG
default y

config GENERIC_BUG_RELATIVE_POINTERS
def_bool y

config NO_IOMEM
def_bool y

Expand Down
10 changes: 2 additions & 8 deletions arch/s390/include/asm/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@

#ifdef CONFIG_BUG

#ifdef CONFIG_64BIT
#define S390_LONG ".quad"
#else
#define S390_LONG ".long"
#endif

#ifdef CONFIG_DEBUG_BUGVERBOSE

#define __EMIT_BUG(x) do { \
Expand All @@ -21,7 +15,7 @@
"2: .asciz \""__FILE__"\"\n" \
".previous\n" \
".section __bug_table,\"a\"\n" \
"3:\t" S390_LONG "\t1b,2b\n" \
"3: .long 1b-3b,2b-3b\n" \
" .short %0,%1\n" \
" .org 3b+%2\n" \
".previous\n" \
Expand All @@ -37,7 +31,7 @@
"0: j 0b+2\n" \
"1:\n" \
".section __bug_table,\"a\"\n" \
"2:\t" S390_LONG "\t1b\n" \
"2: .long 1b-2b\n" \
" .short %0\n" \
" .org 2b+%1\n" \
".previous\n" \
Expand Down

0 comments on commit 52499f4

Please sign in to comment.