Subject: Re: 1.5S vs sparc/MP
To: None <pk@cs.few.eur.nl>
From: Simon J. Gerraty <sjg@quick.com.au>
List: port-sparc
Date: 03/02/2001 00:25:04
> > --- sparc/locore.s      2000/08/31 16:59:12     1.134
> > +++ sparc/locore.s      2001/02/27 06:57:35
> > @@ -4870,6 +4870,9 @@ ENTRY(snapshot)
> >   * and when returning a child to user mode after a fork(2).
> >   */
> >  ENTRY(proc_trampoline)
> > +#ifdef MULTIPROCESSOR
> > +       call _C_LABEL(proc_trampoline_mp)
> > +#endif
> >         call    %l0                     ! re-use current frame
> >          mov    %l1, %o0
> >  
> > which hopefully takes care of that.
> 
> This code fills the delay slot of the call instruction with another
> call instruction. That is a recipe for disaster..
> 
> Try adding a `nop', e.g.:
> 
> 	call _C_LABEL(proc_trampoline_mp)
> 	 nop

You're a genius!

{0}sema_init(0xf02b146c, 0, vcache_page)
{0}sema_signal(0xf02b146c,1) == 1
{0}sema_wait(0xf02b146c) == 0
{1}sema_signal(0xf02b146c,1) == 1
{0}sema_wait(0xf02b146c) == 0
{0}sema_clear(0xf02b146c)
                         Enter pathname of shell or RETURN for sh: 

The {%d} indicates the cpu number.
pressed return, and it will probably spend the rest of the night
spewing those printf's :-)
I think I'll halt it and turn them off ;-)

Ok, don't want to fill my disk with the console log of that...

{0}sema_init(0xf02b146c, 0, vcache_page)
{0}sema_s[BREAK]
ignal(0xf02b146c,1) == 1
Stopped in pid 6 (sh) at        cpu_Debugger+0x4:       jmpl            [%o7 + 0
x8], %g0
db{0}> ps
 PID             PPID       PGRP        UID S   FLAGS          COMMAND    WAIT
>6                  1          6          0 7 0x84006               sh
 5                  0          0          0 3 0xa0204         aiodoned aiodone
 4                  0          0          0 3 0xa0204          ioflush  syncer
 3                  0          0          0 3 0xa0204           reaper  reaper
 2                  0          0          0 3 0xa0204       pagedaemon pgdaemo
 1                  0          1          0 3  0x4084             init    wait
 0                 -1          0          0 3 0xa0204          swapper schedul
db{0}> 

get back to you shortly.

--sjg