From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mehdi Djait <mehdi.djait.k@gmail.com>
Cc: jic23@kernel.org, lars@metafoo.de, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] iio: Improve the kernel-doc of iio_trigger_poll
Date: Thu, 2 Mar 2023 18:23:23 +0200 [thread overview]
Message-ID: <ZADNexu/8SnwfI0B@smile.fi.intel.com> (raw)
In-Reply-To: <ZADMRsDgxKZ/UfJj@carbian>
On Thu, Mar 02, 2023 at 05:18:14PM +0100, Mehdi Djait wrote:
> On Thu, Mar 02, 2023 at 05:54:05PM +0200, Andy Shevchenko wrote:
> > On Thu, Mar 02, 2023 at 02:04:35PM +0100, Mehdi Djait wrote:
> > > Move the kernel-doc of the function to industrialio-trigger.c
> > > Add a note on the context where the function is expected to be called.
...
> > > v2:
> > > - Changed the expected context of from interrupt to hard IRQ context
> >
> > Thank you for an update.
> >
> > But it seems I messed up with this and my previous remark shouldn't be
> > taken into consideration.
> >
> > The "relevant hardware interrupt handler" may be hard and threaded IRQ context,
> > which looks like your first version was correct.
> >
> > Let's wait for Jonathan opinion on this as he is a native speaker.
>
> If I understood the function correctly I think you were right. It should
> be hard IRQ context
>
> The relevant functions calls:
> iio_trigger_poll --> generic_handle_irq --> handle_irq_desc
>
> handle_irq_desc: returns Operation not permitted if !in_hardirq() && handle_enforce_irqctx
> and it is the reason why the sysfs trigger uses the irq_framework to call iio_trigger_poll
> from hard IRQ context [1][2]
Cool, thank you for elaboration!
In any case it's up to Jonathan now what to do. With your explanation it seems
correct to phrase as you did in v2. Hence,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> [1] https://lwn.net/Articles/411605/
> [2] https://lore.kernel.org/all/1346922337-17088-1-git-send-email-lars@metafoo.de/
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-03-02 16:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 13:04 [PATCH v2 0/2] iio: Add kernel-docs and rename iio_trigger_poll_chained Mehdi Djait
2023-03-02 13:04 ` [PATCH v2 1/2] iio: Improve the kernel-doc of iio_trigger_poll Mehdi Djait
2023-03-02 15:54 ` Andy Shevchenko
2023-03-02 16:18 ` Mehdi Djait
2023-03-02 16:23 ` Andy Shevchenko [this message]
2023-03-04 16:42 ` Jonathan Cameron
2023-03-04 16:46 ` Jonathan Cameron
2023-03-04 20:21 ` Mehdi Djait
2023-03-02 13:04 ` [PATCH v2 2/2] iio: Rename iio_trigger_poll_chained and add kernel-doc Mehdi Djait
2023-03-04 16:50 ` 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=ZADNexu/8SnwfI0B@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mehdi.djait.k@gmail.com \
/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