From: der.herr@hofr.at (Nicholas Mc Guire)
To: kernelnewbies@lists.kernelnewbies.org
Subject: udelay vs usleep_range
Date: Sun, 11 Sep 2016 16:48:49 +0000 [thread overview]
Message-ID: <20160911164849.GA9538@osadl.at> (raw)
In-Reply-To: <CA+MoWDoQpJ1MxkwmyZ5AzRTqQfCkVrNx9-KGnHR=_UwKzuodfw@mail.gmail.com>
>
> But looking into the code on line 634 where I found the udelay(33), I
> have the impression that this is a false positive, something your
> checkpatch didn't catch properly. That call is inside a function named
> nvec_interrupt(), and the line:
>
> err = devm_request_irq(&pdev->dev, nvec->irq, nvec_interrupt,
> 0, "nvec", nvec);
>
> declares it as the interrupt handler. The interrupt handler can't
> sleep(interrupt handler runs in the atomic context in terminology of
> timers-howto.txt), and using udelay() seems to be the thing to do
> here.
>
devm_request_irq
-> devm_request_threaded_irq
-> request_threaded_irq
so this should be ok here.
thx!
hofrat
prev parent reply other threads:[~2016-09-11 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-11 15:58 udelay vs usleep_range Gargi Sharma
2016-09-11 16:33 ` Nicholas Mc Guire
2016-09-11 16:37 ` Peter Senna Tschudin
2016-09-11 16:39 ` Nicholas Mc Guire
2016-09-11 16:48 ` Nicholas Mc Guire [this message]
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=20160911164849.GA9538@osadl.at \
--to=der.herr@hofr.at \
--cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).