public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Mikko Perttunen' <mperttunen@nvidia.com>,
	"ldewangan@nvidia.com" <ldewangan@nvidia.com>,
	"digetx@gmail.com" <digetx@gmail.com>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"jonathanh@nvidia.com" <jonathanh@nvidia.com>,
	"wsa@kernel.org" <wsa@kernel.org>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH] i2c: tegra: Wait for config load atomically while in ISR
Date: Mon, 11 Jan 2021 14:31:36 +0000	[thread overview]
Message-ID: <a0b0f224c2864b80a5bac53646d67daf@AcuMS.aculab.com> (raw)
In-Reply-To: <20210111135547.3613092-1-mperttunen@nvidia.com>

From: Mikko Perttunen
> Sent: 11 January 2021 13:56
> 
> Upon a communication error, the interrupt handler can call
> tegra_i2c_disable_packet_mode. This causes a sleeping poll to happen
> unless the current transaction was marked atomic. Since
> tegra_i2c_disable_packet_mode is only called from the interrupt path,
> make it use atomic waiting always.

Spin-waiting in an ISR for anything that it makes sense to do
a sleep-wait for at other times is badly broken design.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2021-01-11 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 13:55 [PATCH] i2c: tegra: Wait for config load atomically while in ISR Mikko Perttunen
2021-01-11 14:31 ` David Laight [this message]
2021-01-11 14:38   ` Mikko Perttunen
2021-01-11 15:14 ` Dmitry Osipenko
2021-01-11 15:52   ` Mikko Perttunen

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=a0b0f224c2864b80a5bac53646d67daf@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=stable@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wsa@kernel.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