Hi, > -----Original Message----- > From: Hans J. Koch [mailto:[email protected]] > Sent: Wednesday, March 02, 2011 12:04 AM > To: TK, Pratheesh Gangadhar > Cc: Hans J. Koch; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; Chatterjee, Amit; > [email protected]; linux-arm- > [email protected] > Subject: Re: [PATCH v6 1/1] PRUSS UIO driver support > > On Tue, Mar 01, 2011 at 10:15:27AM +0530, TK, Pratheesh Gangadhar wrote: > > Hi, > > > > > -----Original Message----- > > > From: Hans J. Koch [mailto:[email protected]] > > > Sent: Tuesday, March 01, 2011 2:57 AM > > > To: TK, Pratheesh Gangadhar > > > Cc: [email protected]; [email protected]; [email protected]; > > > [email protected]; [email protected]; [email protected]; Chatterjee, > Amit; > > > [email protected]; linux-arm- > > > [email protected] > > > Subject: Re: [PATCH v6 1/1] PRUSS UIO driver support > > > > > > On Tue, Mar 01, 2011 at 02:31:35AM +0530, Pratheesh Gangadhar wrote: > > > > + > > > > + /* Register PRUSS IRQ lines */ > > > > + p->irq = IRQ_DA8XX_EVTOUT0 + cnt; > > > > + p->handler = pruss_handler; > > > > + > > > > + ret = uio_register_device(&dev->dev, p); > > > > + > > > > + if (ret < 0) > > > > + goto out_free; > > > > + } > > > > + > > > > + spin_lock_init(&lock); > > > > > > That's too late. uio_register_device() enables the irq, and your > spin_lock > > > is not ready at that time. > > > > This is ok in this context as "modprobe uio_pruss" is pre-requisite for > > running PRUSS firmware and without firmware running PRUSS won't > > generate interrupts. Actually PRUSS INTC is not setup till we start > > user application. > > What if the user application is stopped, UIO driver module unloaded > and loaded again? > This is a possible scenario - may be a buggy application. Normally when application is stopped, PRUs are stopped by exit handler.
> Anyway, please don't use that kind of argumentation. The next newbie > developer might copy your work as a basis for his new driver, and there > it probably won't work. > > Simply put the spin_lock_init before the loop. > Agree, will fix this in next version. Thanks, Pratheesh _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
