android_kernel_xiaomi_sm8350/include/asm-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
..
m32104ut [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
m32700ut [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
mappi2 [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
mappi3 [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
opsput [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
a.out.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
addrspace.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
assembler.h
atomic.h atomic.h: atomic_add_unless as inline. Remove system.h atomic.h circular dependency 2007-05-08 11:15:20 -07:00
auxvec.h
bitops.h
bug.h
bugs.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
byteorder.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
cache.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
cachectl.h
cacheflush.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
checksum.h
cputime.h
current.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
delay.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
device.h
div64.h
dma-mapping.h [PATCH] m32r dma-mapping.h should simply include generic/dma-mapping-broken.h 2007-03-14 15:27:49 -07:00
dma.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
elf.h
emergency-restart.h
errno.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
fcntl.h
flat.h
futex.h
hardirq.h
hw_irq.h
ide.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
io.h
ioctl.h
ioctls.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
ipc.h
ipcbuf.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
irq_regs.h
irq.h
Kbuild
kdebug.h move die notifier handling to common code 2007-05-08 11:15:04 -07:00
kmap_types.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
linkage.h
local.h
m32r_mp_fpga.h
m32r.h
m32102.h
mc146818rtc.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
mman.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
mmu_context.h [PATCH] x86: PARAVIRT: add hooks to intercept mm creation and destruction 2007-05-02 19:27:14 +02:00
mmu.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
mmzone.h
module.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
msgbuf.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
mutex.h
namei.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
page.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
param.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
pci.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
percpu.h
pgalloc.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
pgtable-2level.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
pgtable.h Clean up mostly unused IOSPACE macros 2007-05-08 11:15:13 -07:00
poll.h
posix_types.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
processor.h
ptrace.h
resource.h
rtc.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
s1d13806.h
scatterlist.h PCI: scatterlist.h needs types.h 2007-05-02 19:02:34 -07:00
sections.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
segment.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
semaphore.h
sembuf.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
serial.h
setup.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
shmbuf.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
shmparam.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
sigcontext.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
siginfo.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
signal.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
smp.h Remove hardcoding of hard_smp_processor_id on UP systems 2007-05-09 12:30:48 -07:00
socket.h [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
sockios.h [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
spinlock_types.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
spinlock.h
stat.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
statfs.h
string.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
syscall.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
system.h m32r: fix switch_to macro to push/pop frame pointer if needed 2007-05-11 08:29:33 -07:00
termbits.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
termios.h [PATCH] consolidate line discipline number definitions 2007-02-11 10:51:26 -08:00
thread_info.h
timex.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
tlb.h
tlbflush.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
topology.h
types.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
uaccess.h [PATCH] fix sparse warnings from {asm,net}/checksum.h 2007-02-11 10:51:31 -08:00
ucontext.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
unaligned.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
unistd.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
user.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
vga.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00
xor.h [PATCH] m32r: cosmetic updates and trivial fixes 2007-02-11 10:51:20 -08:00