aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-02-12 07:56:34 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-19 06:30:18 -0500
commitadf8b37bafc1495393201a2ae4235846371870d0 (patch)
treeb1f8a3df5ec6c94b1a90fecc28894a1d6241163d
parentc4c5716e16c4ee971dec446a7e4801fbb8a1066b (diff)
[ARM] 5386/2: unwind: Add Makefile and Kconfig entries for ARM stack unwinding
This patch also makes the frame pointer default to y only if !ARM_UNWIND. LOCKDEP no longer selects FRAME_POINTER if ARM_UNWIND is enabled. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/Kconfig.debug21
-rw-r--r--arch/arm/Makefile4
-rw-r--r--arch/arm/kernel/Makefile1
-rw-r--r--lib/Kconfig.debug2
4 files changed, 22 insertions, 6 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 192ee01a9ba..35f8db35f44 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -2,18 +2,29 @@ menu "Kernel hacking"
2 2
3source "lib/Kconfig.debug" 3source "lib/Kconfig.debug"
4 4
5# RMK wants arm kernels compiled with frame pointers so hardwire this to y. 5# RMK wants arm kernels compiled with frame pointers or stack unwinding.
6# If you know what you are doing and are willing to live without stack 6# If you know what you are doing and are willing to live without stack
7# traces, you can get a slightly smaller kernel by setting this option to 7# traces, you can get a slightly smaller kernel by setting this option to
8# n, but then RMK will have to kill you ;). 8# n, but then RMK will have to kill you ;).
9config FRAME_POINTER 9config FRAME_POINTER
10 bool 10 bool
11 default y 11 default y if !ARM_UNWIND
12 help 12 help
13 If you say N here, the resulting kernel will be slightly smaller and 13 If you say N here, the resulting kernel will be slightly smaller and
14 faster. However, when a problem occurs with the kernel, the 14 faster. However, if neither FRAME_POINTER nor ARM_UNWIND are enabled,
15 information that is reported is severely limited. Most people 15 when a problem occurs with the kernel, the information that is
16 should say Y here. 16 reported is severely limited.
17
18config ARM_UNWIND
19 bool "Enable stack unwinding support"
20 depends on AEABI && EXPERIMENTAL
21 default y
22 help
23 This option enables stack unwinding support in the kernel
24 using the information automatically generated by the
25 compiler. The resulting kernel image is slightly bigger but
26 the performance is not affected. Currently, this feature
27 only works with EABI compilers. If unsure say Y.
17 28
18config DEBUG_USER 29config DEBUG_USER
19 bool "Verbose user fault messages" 30 bool "Verbose user fault messages"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 24e0f018769..e7ef876e574 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -85,6 +85,10 @@ else
85CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 85CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
86endif 86endif
87 87
88ifeq ($(CONFIG_ARM_UNWIND),y)
89CFLAGS_ABI +=-funwind-tables
90endif
91
88# Need -Uarm for gcc < 3.x 92# Need -Uarm for gcc < 3.x
89KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 93KBUILD_CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
90KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 94KBUILD_AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 4305345987d..ca60d335e8f 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -29,6 +29,7 @@ obj-$(CONFIG_ATAGS_PROC) += atags.o
29obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o 29obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
30obj-$(CONFIG_ARM_THUMBEE) += thumbee.o 30obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
31obj-$(CONFIG_KGDB) += kgdb.o 31obj-$(CONFIG_KGDB) += kgdb.o
32obj-$(CONFIG_ARM_UNWIND) += unwind.o
32 33
33obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o 34obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
34AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 35AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 29044f50026..08275a5aa00 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -402,7 +402,7 @@ config LOCKDEP
402 bool 402 bool
403 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT 403 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
404 select STACKTRACE 404 select STACKTRACE
405 select FRAME_POINTER if !X86 && !MIPS && !PPC 405 select FRAME_POINTER if !X86 && !MIPS && !PPC && !ARM_UNWIND
406 select KALLSYMS 406 select KALLSYMS
407 select KALLSYMS_ALL 407 select KALLSYMS_ALL
408 408