[PATCH] ppc64: remove hidden -fno-omit-frame-pointer for schedule.c

Anton Blanchard anton at samba.org
Sun May 1 19:56:39 EST 2005


> Could we please use a new CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER, define
> that in the arch's Kconfig?
> 
> (is that a triple negative I see?)

I like it. Hopefully someone suitably annoyed by this triple negative
will go and work out which damn architectures actually need
-fno-omit-frame-pointer and reverse the test.

For now ppc32, ppc64, ia64 dont need it.

Anton

--

While looking at code generated by gcc4.0 I noticed some functions still
had frame pointers, even after we stopped ppc64 from defining
CONFIG_FRAME_POINTER. It turns out kernel/Makefile hardwires
-fno-omit-frame-pointer on when compiling schedule.c.

Create CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER and define it on
architectures that dont require frame pointers in sched.c code.

Signed-off-by: Anton Blanchard <anton at samba.org>

Index: linux-2.6.12-rc2/kernel/Makefile
===================================================================
--- linux-2.6.12-rc2.orig/kernel/Makefile	2005-04-19 13:37:40.599016667 +1000
+++ linux-2.6.12-rc2/kernel/Makefile	2005-05-01 19:48:44.471448005 +1000
@@ -32,7 +32,7 @@
 obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
 obj-$(CONFIG_SECCOMP) += seccomp.o
 
-ifneq ($(CONFIG_IA64),y)
+ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
 # According to Alan Modra <alan at linuxcare.com.au>, the -fno-omit-frame-pointer is
 # needed for x86 only.  Why this used to be enabled for all architectures is beyond
 # me.  I suspect most platforms don't need this, but until we know that for sure
Index: linux-2.6.12-rc2/arch/ia64/Kconfig
===================================================================
--- linux-2.6.12-rc2.orig/arch/ia64/Kconfig	2005-04-19 13:37:33.173418325 +1000
+++ linux-2.6.12-rc2/arch/ia64/Kconfig	2005-05-01 19:49:35.060202590 +1000
@@ -46,6 +46,10 @@
 	bool
 	default y
 
+config SCHED_NO_NO_OMIT_FRAME_POINTER
+	bool
+	default y
+
 choice
 	prompt "System type"
 	default IA64_GENERIC
Index: linux-2.6.12-rc2/arch/ppc/Kconfig
===================================================================
--- linux-2.6.12-rc2.orig/arch/ppc/Kconfig	2005-04-19 13:37:33.450396856 +1000
+++ linux-2.6.12-rc2/arch/ppc/Kconfig	2005-05-01 19:49:24.699414050 +1000
@@ -43,6 +43,10 @@
 	bool
 	default y
 
+config SCHED_NO_NO_OMIT_FRAME_POINTER
+	bool
+	default y
+
 source "init/Kconfig"
 
 menu "Processor"
Index: linux-2.6.12-rc2/arch/ppc64/Kconfig
===================================================================
--- linux-2.6.12-rc2.orig/arch/ppc64/Kconfig	2005-05-01 05:39:38.017058150 +1000
+++ linux-2.6.12-rc2/arch/ppc64/Kconfig	2005-05-01 19:50:47.878561880 +1000
@@ -40,6 +40,10 @@
 	bool
 	default y
 
+config SCHED_NO_NO_OMIT_FRAME_POINTER
+	bool
+	default y
+
 # We optimistically allocate largepages from the VM, so make the limit
 # large enough (16MB). This badly named config option is actually
 # max order + 1



More information about the Linuxppc64-dev mailing list