lkml.org 
[lkml]   [2006]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.17-rc1] [SERIAL] DCC(JTAG) serial and the console emulation support(revised#2)
On Tue, Apr 04, 2006 at 11:27:06AM +0900, Hyok S. Choi wrote:
> On Tuesday 04 April 2006 04:44 am, Russell King wrote:
> > On Mon, Apr 03, 2006 at 08:24:10PM +0900, Hyok S. Choi wrote:
> >
> > > +static void dcc_shutdown(struct uart_port *port)
> > > +{
> > > +#ifdef DCC_IRQ_USED /* real IRQ used */
> > > + free_irq(port->irq, port);
> > > +#else
> > > + spin_lock(&port->lock);
> > > + cancel_rearming_delayed_work(&dcc_poll_task);
> >
> > cancel_rearming_delayed_work() might sleep due to it calling
> > flush_workqueue. Therefore, you must not be holding a spinlock.
>
> Thus, I've just revised the code to lock around a counter variable
> operation, which is used for life control of the polling task.
> I've just posted the revised #3. :-)

Why do you think you need such complexity?

cancel_rearming_delayed_work() will wait until the poll task has
completed and has been removed from the system. It's explicitly
designed for work handlers which self-rearm.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-04 10:22    [W:0.131 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site