From: Steven Rostedt <rostedt@goodmis.org>
To: Jonathan Cameron <jic23@cam.ac.uk>
Cc: LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Possible to software trigger an interrupt?
Date: Thu, 7 Apr 2011 09:20:48 -0400 [thread overview]
Message-ID: <20110407132048.GA7257@home.goodmis.org> (raw)
In-Reply-To: <4D98A185.1080704@cam.ac.uk>
On Sun, Apr 03, 2011 at 05:34:13PM +0100, Jonathan Cameron wrote:
> On 04/03/11 17:04, Jonathan Cameron wrote:
> > Hi,
> >
> > Having produced a proof of concept for using gpio chips
> > to handle the triggers in IIO I am looking at converting
> > over our sysfs trigger. This trigger is used to initialize
> > capture on devices in a similar way to dataready interrupts.
> > The key point is we want to handle this in the same way within
> > drivers as the hardware event triggers.
> >
> > It is a very useful tool. So the upshot is, what is the best
> > way to handle causing an interrupt to occur from userspace?
> >
> > Any pointers on how to do this would be most welcome.
>
> For what it is worth, the incredibly dumb approach of just
> calling handle_nested_irq seems to 'work'. I dread to think
> what that might be quietly breaking though...
I think you are fine in calling that. It's made to be called from a
threaded context. But if you are testing code that will someday be
called in an interrupt context, it may not catch everything you need.
For example, a mutex is allowed to be called from a threaded context,
but not from a hard irq one. There may be other subtle locking issues as
well. These could be caught with lockdep, but only when the code is
really been executed from hard irq context.
-- Steve
>
> My understanding of some of this code is still rather limited
> I'm afraid!
next prev parent reply other threads:[~2011-04-07 13:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 16:04 Jonathan Cameron
2011-04-03 16:34 ` Jonathan Cameron
2011-04-07 13:20 ` Steven Rostedt [this message]
2011-04-07 13:30 ` Jonathan Cameron
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=20110407132048.GA7257@home.goodmis.org \
--to=rostedt@goodmis.org \
--cc=jic23@cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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