re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread matthew green
> On Fri, Mar 09, 2012 at 02:49:43PM +, Julian Coleman wrote: > > Hi, > > > > After the change in revision 1.156 of src/sys/dev/scsipi/scsipi_base.c to > > assert that the kernel lock is held in scsipi_lookup_periph(), my SBus-based > > sparc64 crashed with: > > > > panic: kernel diagnosti

re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread matthew green
> After the change in revision 1.156 of src/sys/dev/scsipi/scsipi_base.c to > assert that the kernel lock is held in scsipi_lookup_periph(), my SBus-based > sparc64 crashed with: > > panic: kernel diagnostic assertion "KERNEL_LOCKED_P()" failed: file > "/usr/src/sys/dev/scsipi/scsipi_base.c",

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Manuel Bouyer
On Sat, Mar 10, 2012 at 03:22:43AM +0900, Izumi Tsutsui wrote: > > Since attach is usually called when the system is cold, there are no > > other CPUs running so the system is effectively in KERNEL_LOCK(). > > > > Rather than fix the driver, maybe init_main should take out KERNEL_LOCK() > > until

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Izumi Tsutsui
matt@ wrote: > On Mar 9, 2012, at 7:53 AM, Manuel Bouyer wrote: > > > On Fri, Mar 09, 2012 at 04:44:54PM +0100, Martin Husemann wrote: > >> On Fri, Mar 09, 2012 at 04:39:08PM +0100, Manuel Bouyer wrote: > >>> if ncr53c9x is not MP-safe, it should be running under the KERNEL_LOCK > >>> itself, and

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Matt Thomas
On Mar 9, 2012, at 7:53 AM, Manuel Bouyer wrote: > On Fri, Mar 09, 2012 at 04:44:54PM +0100, Martin Husemann wrote: >> On Fri, Mar 09, 2012 at 04:39:08PM +0100, Manuel Bouyer wrote: >>> if ncr53c9x is not MP-safe, it should be running under the KERNEL_LOCK >>> itself, and so should not need to ta

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Manuel Bouyer
On Fri, Mar 09, 2012 at 04:44:54PM +0100, Martin Husemann wrote: > On Fri, Mar 09, 2012 at 04:39:08PM +0100, Manuel Bouyer wrote: > > if ncr53c9x is not MP-safe, it should be running under the KERNEL_LOCK > > itself, and so should not need to take it before calling back in > > scsipi. > > Where is

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Martin Husemann
On Fri, Mar 09, 2012 at 04:39:08PM +0100, Manuel Bouyer wrote: > if ncr53c9x is not MP-safe, it should be running under the KERNEL_LOCK > itself, and so should not need to take it before calling back in > scsipi. Where is that dealt with? I.e. where is the lock taken before the attach function is

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Manuel Bouyer
On Fri, Mar 09, 2012 at 04:30:56PM +0100, Martin Husemann wrote: > On Fri, Mar 09, 2012 at 04:17:42PM +0100, Manuel Bouyer wrote: > > assuming ncr53c9x is MP-safe, it is correct. > > Just out of curiosity: assuming it isn't, what would be different? if ncr53c9x is not MP-safe, it should be runnin

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Martin Husemann
On Fri, Mar 09, 2012 at 04:17:42PM +0100, Manuel Bouyer wrote: > assuming ncr53c9x is MP-safe, it is correct. Just out of curiosity: assuming it isn't, what would be different? Martin

Re: ncr53c9x fallout from asserting kernel lock in scsipi_base

2012-03-09 Thread Manuel Bouyer
On Fri, Mar 09, 2012 at 02:49:43PM +, Julian Coleman wrote: > Hi, > > After the change in revision 1.156 of src/sys/dev/scsipi/scsipi_base.c to > assert that the kernel lock is held in scsipi_lookup_periph(), my SBus-based > sparc64 crashed with: > > panic: kernel diagnostic assertion "KERN