From: "Hyok S. Choi" <hyok.choi@samsung.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.17-rc1] [SERIAL] DCC(JTAG) serial and the console emulation support(revised#2)
Date: Tue, 04 Apr 2006 18:46:45 +0900 [thread overview]
Message-ID: <200604041846.46366.hyok.choi@samsung.com> (raw)
In-Reply-To: <20060404082005.GB8573@flint.arm.linux.org.uk>
On Tuesday 04 April 2006 05:20 pm, Russell King wrote:
> 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.
Hmm.. Maybe you're right, because dcc_shutdown and dcc_startup, which
are the only functions that initiate or stop the work, will never be
called concurrently by different callers?
--
Hyok
ARM Linux 2.6 MPU/noMMU Project http://opensrc.sec.samsung.com/
next prev parent reply other threads:[~2006-04-04 9:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-03 11:24 Hyok S. Choi
2006-04-03 19:44 ` Russell King
2006-04-04 2:27 ` Hyok S. Choi
2006-04-04 8:20 ` Russell King
2006-04-04 9:46 ` Hyok S. Choi [this message]
2006-04-04 9:51 ` Russell King
2006-04-03 11:48 Hyok S. Choi
2006-04-03 11:54 Hyok S. Choi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604041846.46366.hyok.choi@samsung.com \
--to=hyok.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome