From: Christian Eggers <ceggers@arri.de>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Hartmut Knaack <knaack.h@gmx.de>,
"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
<linux-iio@vger.kernel.org>
Subject: Re: [PATCH 1/2] iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context
Date: Fri, 2 Oct 2020 16:10:09 +0200 [thread overview]
Message-ID: <1672856.66Rh2xUnMN@n95hx1g2> (raw)
In-Reply-To: <20200921105703.000048b3@Huawei.com>
Hi Jonathan,
On Monday, 21 September 2020, 11:57:03 CEST, Jonathan Cameron wrote:
> On Mon, 21 Sep 2020 09:17:26 +0200
>
> Christian Eggers <ceggers@arri.de> wrote:
> > Tested together with
> >
> > - iio: Fix: Do not poll the driver again if try_reenable() callback
> > returns non 0. and
> > - iio:trigger: rename try_reenable() to reenable() plus return void
> >
> > on latest mainline (without PREEMPT_RT). The original WARN_ONCE() in
> > kernel/irq/handle.c:159 was not raised anymore. But even without the
> > current patches, this warning is not shown (as this problem only applies
> > to -RT).
> >
> > Currently I haven't ported a RT kernel > 5.4 for my board, so I cannot
> > check with current RT. On 5.4. there the patches seem not to work fully
> > as kernel/timer/hrtimer.c is not up to date enough.
> >
> > Sorry for being not very helpful...
>
> Thanks for at least trying!
I've just ported my BSP to v5.9-rc7-rt10. It looks like your patch misses one
additional change in iio_trig_hrtimer_set_state():
- hrtimer_start(&trig_info->timer, trig_info->period,
- HRTIMER_MODE_REL);
+ hrtimer_start(&trig_info->timer, trig_info->period,
+ HRTIMER_MODE_REL_HARD);
Without this, WARN_ON_ONCE() in kernel/time/hrtimer.c:1133 will be hit:
WARN_ON_ONCE(!(mode & HRTIMER_MODE_HARD) ^ !timer->is_hard);
So the mode HRTIMER_MODE_REL_HARD is required for hrtimer_init() (will be
stored in timer->is_hard) and for hrtimer_start().
Best regards
Christian
next prev parent reply other threads:[~2020-10-02 14:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 7:53 [PATCH 1/2] iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context Lars-Peter Clausen
2020-08-13 7:53 ` [PATCH 2/2] iio: sysfs-trigger: Mark irq_work to expire in hardirq context Lars-Peter Clausen
2020-08-13 9:11 ` [PATCH 1/2] iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context Sebastian Andrzej Siewior
2020-08-13 9:46 ` Lars-Peter Clausen
2020-08-13 11:27 ` Sebastian Andrzej Siewior
2020-08-13 12:19 ` Thomas Gleixner
2020-08-13 14:55 ` Jonathan Cameron
2020-08-14 5:24 ` Lars-Peter Clausen
2020-08-14 10:30 ` Jonathan Cameron
2020-09-20 18:15 ` Jonathan Cameron
2020-09-21 7:17 ` Christian Eggers
2020-09-21 9:57 ` Jonathan Cameron
2020-09-21 12:27 ` Sebastian Andrzej Siewior
2020-09-21 13:32 ` Jonathan Cameron
2020-09-22 2:51 ` Andy Duan
2020-09-24 6:41 ` Sanchayan Maity
2020-09-24 8:54 ` Stefan Agner
2020-09-25 12:42 ` Jonathan Cameron
2020-10-02 14:10 ` Christian Eggers [this message]
2020-10-10 13:23 ` 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=1672856.66Rh2xUnMN@n95hx1g2 \
--to=ceggers@arri.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=bigeasy@linutronix.de \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--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;
as well as URLs for NNTP newsgroup(s).