linux/arch/m32r
Hirokazu Takata 43c09ce792 m32r: fix switch_to macro to push/pop frame pointer if needed
This patch fixes a rarely-happened but severe scheduling problem of
the recent m32r kernel of 2.6.17-rc3 or later.

In the following previous m32r patch, the switch_to macro was
modified not to do unnecessary push/pop operations for tuning.
> [PATCH] m32r: update switch_to macro for tuning
> 4127272c38

In this modification, only 'lr' and 'sp' registers are push/pop'ed,
assuming that the m32r kernel is always compiled with
-fomit-frame-pointer option.

However, in 2.6 kernel, kernel/sched.c is irregularly compiled
with -fno-omit-frame-pointer if CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER
is not defined.

 -- kernel/Makefile --
   :
 ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
 # According to Alan Modra <alan@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
 # I turn this off for IA-64 only.  Andreas Schwab says it's also needed on m68k
 # to get a correct value for the wait-channel (WCHAN in ps). --davidm
 CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
 endif
   :
 ---

Therefore, for the recent m32r kernel, we have to push/pop 'fp'
(frame pointer) if CONFIG_FRAME_POINTER is defined or
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER is not defined.

Signed-off-by: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-11 08:29:33 -07:00
..
boot [PATCH] m32r: bootloader support for OPSPUT platform 2006-12-08 08:28:37 -08:00
kernel header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
lib Various typo fixes. 2007-02-17 19:07:33 +01:00
m32104ut [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
m32700ut [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
mappi [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
mappi2 [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
mappi3 [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
mm header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
oaks32r [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
oprofile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
opsput [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
defconfig [PATCH] m32r: update defconfig files for v2.6.19 2007-02-11 10:51:20 -08:00
Kconfig m32r: fix switch_to macro to push/pop frame pointer if needed 2007-05-11 08:29:33 -07:00
Kconfig.debug [PATCH] kconfig: clarify memory debug options 2006-03-25 08:22:54 -08:00
Makefile [PATCH] m32r: fix kernel entry address of vmlinux 2007-02-11 10:51:20 -08:00