linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Christian Eggers <ceggers@arri.de>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	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: Sat, 10 Oct 2020 14:23:07 +0100	[thread overview]
Message-ID: <20201010142307.72a15451@archlinux> (raw)
In-Reply-To: <1672856.66Rh2xUnMN@n95hx1g2>

On Fri, 2 Oct 2020 16:10:09 +0200
Christian Eggers <ceggers@arri.de> wrote:

> Hi Jonathan,

Lars-Peter's patch! But I'm sure he'll do an updated version to deal
with the point you make below.

@Lars no great hurry as this isn't going to make the merge window
anyway so we have a couple of weeks. Will have to hit after rc1 and
get backported as relevant.

Thanks,

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
> 
> 
> 
> ________________________________
>  [http://assets.arri.com/media/sign/2020-04-03-E-mail-signature-Stellar2_V1.jpg] <https://microsites.arri.com/stellar/>
> 
> Get all the latest information from www.arri.com<https://www.arri.com/>, Facebook<https://www.facebook.com/TeamARRI>, Twitter<https://twitter.com/ARRIChannel>, Instagram<https://instagram.com/arri> and YouTube<https://www.youtube.com/user/ARRIChannel>.
> 
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
> Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
> Geschäftsführer: Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger; Markus Zeiler


      reply	other threads:[~2020-10-10 22:57 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
2020-10-10 13:23                       ` Jonathan Cameron [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=20201010142307.72a15451@archlinux \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bigeasy@linutronix.de \
    --cc=ceggers@arri.de \
    --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).