From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: linuxppc-dev@ozlabs.org, johannes@sipsolutions.net,
linux-kernel@killerfox.forkbomb.ch
Subject: Re: [PATCH] SMU LED driver
Date: Mon, 15 Jan 2007 08:48:59 +1100 [thread overview]
Message-ID: <1168811339.4803.23.camel@localhost.localdomain> (raw)
In-Reply-To: <20070114133119.GA22354@hansmi.ch>
On Sun, 2007-01-14 at 14:31 +0100, Michael Hanselmann wrote:
> On Mon, Jan 08, 2007 at 12:02:45PM +1100, Benjamin Herrenschmidt wrote:
> > Just have 1 request allocated once for all. Then, have a global set to
> > what status you want the LED at. Once the completion of any request
> > arrives, if the new status is different from what you want, send a new
> > one to fix it up :-)
>
> Implemented that. See below.
>
> There's a race condition between setting the LED value and unloading the
> module. smu_led_exit can't return an error. Is it possible to prevent
> unloading the module while an SMU request is still running, and if yes,
> how?
No, you have to deal with it in the unload. You can for example wait for
the SMU request to complete after setting wanted to -1, that sort of
thing.
Also, use spin_lock_irqsave/restore or you'll deadlock if the SMU
completion interrupt happens to interrupt your request function.
Ben.
next prev parent reply other threads:[~2007-01-14 21:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-24 11:23 [PATCH] SMU LED driver Michael Hanselmann
2006-12-25 21:25 ` Benjamin Herrenschmidt
2006-12-26 22:38 ` Johannes Berg
2007-01-06 21:19 ` Michael Hanselmann
2007-01-08 1:02 ` Benjamin Herrenschmidt
2007-01-14 13:31 ` Michael Hanselmann
2007-01-14 21:48 ` Benjamin Herrenschmidt [this message]
2007-01-15 0:26 ` Michael Hanselmann
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=1168811339.4803.23.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@hansmi.ch \
--cc=linux-kernel@killerfox.forkbomb.ch \
--cc=linuxppc-dev@ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.