Port-hp700 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GENERIC.MP hangs



Hi!


From: Nick Hudson <skrll%netbsd.org@localhost>
Date: Wed, 03 Apr 2013 15:21:11 +0000

> On 04/01/13 15:27, KIYOHARA Takashi wrote:

> > GENERIC.MP hangs in percpu_alloc().  cpu0 waits cpu1 into idle_loop().
> > However cpu1 doesn't go idle_loop() on hp700 in
> > arch/hp700/dev/cpu.c:cpu_hatch().
> 
> [snip]
> 
> > Please fix. :)
> >
> > However,
> > Oops,  hangs again for another reason after resolved this problem...  X-<
> > probably I will report again in several months.
> 
> Do you have a patch you'd like reviewing?

I try with this change.

Index: cpu.c
===================================================================
RCS file: /cvsroot/src/sys/arch/hp700/dev/cpu.c,v
retrieving revision 1.30
diff -u -r1.30 cpu.c
--- cpu.c       21 Feb 2013 15:16:02 -0000      1.30
+++ cpu.c       6 Apr 2013 09:56:49 -0000
@@ -38,6 +38,7 @@
 #include <sys/device.h>
 #include <sys/atomic.h>
 #include <sys/reboot.h>
+#include <sys/idle.h>
 
 #include <uvm/uvm.h>
 
@@ -283,9 +284,8 @@
        while (!start_secondary_cpu)
                ;
 
-       /* Spin for now */
-       for (;;)
-               ;
+       idle_loop(NULL);
 
+       /* NOTREACHED */
 }
 #endif


But, I think more better to call idle_loop() in locore.S.  This reason
is our stack space more than free in cpu_hatch().

# I don't know PA-RISC assembler.  X-<
Maybe, it is more better?

Index: locore.S
===================================================================
RCS file: /cvsroot/src/sys/arch/hp700/hp700/locore.S,v
retrieving revision 1.61
diff -u -r1.61 locore.S
--- locore.S    23 May 2012 16:11:37 -0000      1.61
+++ locore.S    6 Apr 2013 10:05:12 -0000
@@ -523,6 +523,7 @@
         * Okay, time to return to the land of C.
         */
        b       cpu_hatch
+       b       idle_loop
        nop
 
 EXIT(hw_cpu_spinup_trampoline)


> There's quite a lot of work needed in pmap and trap handlers for full MP 
> support.

OK!
I will try and report next month(?).

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index