kernel_optimize_test/arch/powerpc
Paul Mackerras f39224a8c1 powerpc: Use correct sequence for putting CPU into nap mode
We weren't using the recommended sequence for putting the CPU into
nap mode.  When I changed the idle loop, for some reason 7447A cpus
started hanging when we put them into nap mode.  Changing to the
recommended sequence fixes that.

The complexity here is that the recommended sequence is a loop that
keeps putting the cpu back into nap mode.  Clearly we need some way
to break out of the loop when an interrupt (external interrupt,
decrementer, performance monitor) occurs.  Here we use a bit in
the thread_info struct to indicate that we need this, and the exception
entry code notices this and arranges for the exception to return
to the value in the link register, thus breaking out of the loop.
We use a new `local_flags' field in the thread_info which we can
alter without needing to use an atomic update sequence.

The PPC970 has the same recommended sequence, so we do the same thing
there too.

This also fixes a bug in the kernel stack overflow handling code on
32-bit, since it was causing a value that we needed in a register to
get trashed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-18 21:49:11 +10:00
..
boot Merge ../linux-2.6 2006-03-17 12:01:19 +11:00
configs powerpc: Make uImage default build output for MPC8540 ADS 2006-03-27 23:44:37 -06:00
kernel powerpc: Use correct sequence for putting CPU into nap mode 2006-04-18 21:49:11 +10:00
lib [PATCH] powerpc: fix various sparse warnings 2006-03-27 14:48:08 +11:00
math-emu powerpc: move math-emu over to arch/powerpc 2006-03-27 23:43:27 -06:00
mm [PATCH] powerpc: trivial spelling fixes in fault.c 2006-04-01 22:37:13 +11:00
oprofile [PATCH] powerpc: Remove oprofile spinlock backtrace code 2006-03-29 13:44:16 +11:00
platforms [PATCH] spufs: fix context-switch decrementer code 2006-04-13 09:38:46 -07:00
sysdev Merge ../powerpc-merge 2006-02-24 14:05:47 +11:00
xmon [PATCH] powerpc: add a raw dump command to xmon 2006-03-17 13:22:33 +11:00
Kconfig powerpc: Use correct sequence for putting CPU into nap mode 2006-04-18 21:49:11 +10:00
Kconfig.debug powerpc: remove OCP references 2006-03-27 23:48:37 -06:00
Makefile [PATCH] powerpc32: Set cpu explicitly in kernel compiles 2006-04-13 09:38:33 -07:00