linux/arch
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
..
alpha utimensat implementation 2007-05-08 11:15:18 -07:00
arm Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-05-09 13:05:57 -07:00
arm26 header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
avr32 Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32 2007-05-09 12:50:25 -07:00
blackfin rename thread_info to stack 2007-05-09 12:30:56 -07:00
cris Fix trivial typos in Kconfig* files 2007-05-09 07:12:20 +02:00
frv frv: gdb: use __maybe_unused 2007-05-11 08:29:33 -07:00
h8300 h8300 syscall update 2007-05-11 08:29:33 -07:00
i386 Revert "[PATCH] paravirt: Add startup infrastructure for paravirtualization" 2007-05-10 09:26:53 -07:00
ia64 [IA64] sa_interrupt is deprecated 2007-05-09 14:20:59 -07:00
m32r m32r: fix switch_to macro to push/pop frame pointer if needed 2007-05-11 08:29:33 -07:00
m68k header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
m68knommu Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
parisc rename thread_info to stack 2007-05-09 12:30:56 -07:00
powerpc [POWERPC] Fix compile error with kexec and CONFIG_SMP=n 2007-05-10 22:17:18 +10:00
ppc Merge branch 'linux-2.6' 2007-05-10 21:08:37 +10:00
s390 [S390] update default configuration. 2007-05-10 15:46:08 +02:00
sh Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6 2007-05-09 13:08:20 -07:00
sh64 Simplify kallsyms_lookup() 2007-05-08 11:15:08 -07:00
sparc rename thread_info to stack 2007-05-09 12:30:56 -07:00
sparc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-05-10 13:32:05 -07:00
um Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
v850 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
x86_64 x86_64: display more intuitive error message if kernel is not 2MB aligned 2007-05-11 08:29:32 -07:00
xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00