NetBSD-Bugs archive

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

re: port-i386/47244: Fit PC2i (Atom processor) won't boot i386-current



On Mon, 26 Nov 2012, matthew green wrote:


   Date: Sun, 25 Nov 2012 20:15:01 +0000 (UTC)
   From: htodd%twofifty.com@localhost

   lockdebug_more(c0bdc16a,1,0,0,c07997ab,0,c24ad6d0,daa68944,c0934df1,0) at 
netbsd:lockdebug_more
   
mutex_enter(c11dc788,c11dc788,c2509000,c043bc8e,0,daa689a8,c043ccb3,c29bbe0c,c2509e10,1)
  at netbsd:mutex_enter+0x4a2
   usb_add_task(c29bbe0c,c2509e10,1,c056a876,6,0,0,6,c2509254,c25098ec) at 
netbsd:usb_add_task+0x28
   
run_do_async(0,c2509254,daa689e0,c0393b05,c2509254,c25098f2,1,c07956ed,c27e1154,c25098f0)
 at netbsd:run_do_async+0xde

Looks like a bug from usbmp: the comment above usb_add_task in usb.c
says that it can be used from any context, but the task queue lock is
an adaptive mutex, which can't be taken in just any context.

indeed.  please try this patch (and ignore christos' :-)


Index: usb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usb.c,v
retrieving revision 1.135
diff -p -r1.135 usb.c
*** usb.c       20 Jul 2012 23:18:02 -0000      1.135
--- usb.c       25 Nov 2012 23:04:10 -0000
*************** usb_once_init(void)
*** 224,230 ****
                taskq = &usb_taskq[i];

                TAILQ_INIT(&taskq->tasks);
!               mutex_init(&taskq->lock, MUTEX_DEFAULT, IPL_NONE);
                cv_init(&taskq->cv, "usbtsk");
                taskq->name = taskq_names[i];
                if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL,
--- 224,234 ----
                taskq = &usb_taskq[i];

                TAILQ_INIT(&taskq->tasks);
!               /*
!                * Since USB tasks are callable from any context, we have to
!                * make this lock a spinlock.
!                */
!               mutex_init(&taskq->lock, MUTEX_DEFAULT, IPL_USB);
                cv_init(&taskq->cv, "usbtsk");
                taskq->name = taskq_names[i];
                if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL,

This "works" but I don't have all the locking/debugging enabled yet.
Also, pckbc still has to be disabled.

--
Hisashi T Fujinaka - htodd%twofifty.com@localhost
BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte


Home | Main Index | Thread Index | Old Index