NetBSD-Bugs archive

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

Re: port-macppc/54331: macppc MP kernels fail to boot successfully in -current (8.99.49)



The following reply was made to PR port-macppc/54331; it has been noted by GNATS.

From: "David H. Gutteridge" <david%gutteridge.ca@localhost>
To: gnats-bugs%netbsd.org@localhost, matthew green <mrg%eterna.com.au@localhost>
Cc: 
Subject: Re: port-macppc/54331: macppc MP kernels fail to boot successfully
 in -current (8.99.49)
Date: Sun, 11 Aug 2019 18:24:16 -0400

 On Thu, 2019-08-01 at 17:26 +1000, matthew green wrote:
 > >  panic: kernel diagnostic assertion "mutex_owned(&sc->sc_lock)" failed: file "/home/disciple/netbsd-8/src/sys/dev/usb/ohci.c", line 590
 > 
 > i think i see the problem here.
 > 
 > >  Stopped in pid 0.1 (system) at  netbsd:vpanic+0x140:     addi     r4,  r0,  0x0
 > >  0x00c56a90: at kern_assert+0x68
 > >  0x00c56ad0: at ohci_reset_std_chain+0x518
 > >  0x00c56b30: at ohci_device_intr_start+0xd8
 > 
 > ohci_device_intr_start() only takes the lock when not polling, so
 > this assert needs to be adjusted for that.
 > 
 > can you try this patch?  it probably won't fix the original hang,
 > but it should fix this issue.  it's against netbsd-8 though i
 > am fairly sure that the code is the same in -current.
 > 
 > 
 > .mrg.
 > 
 > 
 > Index: ohci.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/dev/usb/ohci.c,v
 > retrieving revision 1.273.6.4
 > diff -p -u -r1.273.6.4 ohci.c
 > --- ohci.c	27 Sep 2018 14:52:26 -0000	1.273.6.4
 > +++ ohci.c	1 Aug 2019 07:25:46 -0000
 > @@ -587,7 +587,7 @@ ohci_reset_std_chain(ohci_softc_t *sc, s
 >  	OHCIHIST_FUNC(); OHCIHIST_CALLED();
 >  	DPRINTF("start len=%jd", alen, 0, 0, 0);
 >  
 > -	KASSERT(mutex_owned(&sc->sc_lock));
 > +	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock));
 >  
 >  	DPRINTFN(8, "addr=%jd endpt=%jd len=%jd speed=%jd",
 >  	    xfer->ux_pipe->up_dev->ud_addr,
 > @@ -1675,7 +1675,7 @@ ohci_device_bulk_done(struct usbd_xfer *
 >  	int isread =
 >  	    (UE_GET_DIR(xfer->ux_pipe->up_endpoint->ue_edesc->bEndpointAddress) == UE_DIR_IN);
 >  
 > -	KASSERT(mutex_owned(&sc->sc_lock));
 > +	KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock));
 >  
 >  	OHCIHIST_FUNC(); OHCIHIST_CALLED();
 >  	DPRINTFN(10, "xfer=%#jx, actlen=%jd", (uintptr_t)xfer, xfer->ux_actlen,
 
 Hi,
 
 Your patch fixed the remaining issue booting an MP+DEBUG+DIAGNOSTIC+
 LOCKDEBUG kernel built from the netbsd-8 branch. Thanks!
 
 With this plus macallan@'s earlier patch applied, I don't see any
 remaining issues for netbsd-8, so we've narrowed this PR to what's in
 HEAD/netbsd-9 now.
 
 Dave
 
 


Home | Main Index | Thread Index | Old Index