Re: 2.6.7-mm6

David S. Miller
2004-07-07T00:05:42Z

On Tue, 6 Jul 2004 16:36:18 -0700
William Lee Irwin III <wli@holomorphy.com> wrote:

> I have it isolated down to the sched-clean-init-idle.patch and
> sched-clean-fork.patch. sched-clean-init-idle.patch fails to build without
> the second of those two applied, so I didn't do any work to narrow it down
> further.

One thing to note is that we don't currently call the
wake_up_forked_process() thing in our SMP idle bootup
dispatcher in arch/sparc64/kernel/smp.c

Perhaps that is somehow related to the problems.
In that case the culprit would be the first patch,
sched-clean-init-idle.patch

See arch/sparc64/kernel/smp.c:smp_boot_one_cpu() for details.
When we start a cpu, by calling prom_startcpu(), the cpu
jumps from the firmware into arch/sparc64/kernel/trampoline.S

There, the cpu is initialized (just like it is for the boot cpu
in arch/sparc64/kernel/head.S), the current_thread_info() (%g6)
and 'current' (%g4) registers are initialized and the cpu jumps
into smp_callin(). smp_callin() returns when it is safe to do
so, which is when it's cpu bit is set in smp_commenced_mask.
When that occurs, it's cpu bit is set in cpu_online_map and
then it jumps right into cpu_idle().

Hope this helps.