> 
> > +           if (setjmp(crash_shutdown_buf) == 0) {
> > +                   asm volatile("sync; isync");
> > +                   crash_shutdown_handles[i]();
> > +                   asm volatile("sync; isync");
> > +                   __delay(200);
> 
> This looks a bit random. Why the handcoded barriers, and why the delay?
> I don't see a need for the barriers at all here?
I was following the bouncing ball here from the xmon code.  We don't
want the hardware executing any of potentially dangerous hooks before
we've setup the setjmp save buffer.  Similar, any code past the
dangerous hooks shouldn't be executed before we take a machine check.

It's definitely not a fast path so.... :-)

> At least comment why the delay is needed (and why just 200 is
> sufficient). 

xmon.c says: 
   /* wait a little while to see if we get a machine check */

I'll update the "200" with a #define SETJMP_MACHINE_CHECK_DELAY and push
the same change into the xmon code.  This delay in the machine check is
apparently required on 601 machines.

All you other comments I agree with.

Mikey
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to