linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-i2c@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Mike Galbraith <umgwanakikbuti@gmail.com>,
	Mike Rapoport <mike@compulab.co.il>,
	Jean Delvare <khali@linux-fr.org>
Subject: Re: rt-mutex usage in i2c
Date: Sat, 14 Mar 2015 12:27:03 +0100	[thread overview]
Message-ID: <20150314112703.GD970@katana> (raw)
In-Reply-To: <54FDA380.8030405@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 794 bytes --]

Hi Sebastian,

> - i2c_transfer() has this piece:
>   2091                 if (in_atomic() || irqs_disabled()) {
>   2092                         ret = i2c_trylock_adapter(adap);
> 
>   is this irqs_disabled() is what bothers me and should not be there.
>   pxa does a spin_lock_irq() which would enable interrupts on return /
>   too early.
>   mxs has a wait_for_completion() which needs irqs enabled _and_ makes
>   in_atomic() problematic, too. I have't checked other drivers but the
>   commit, that introduced it, does not explain why it is required.

I haven't really looked into it, but a quick search gave me this thread
explaining the intention of the code in question:

http://lists.lm-sensors.org/pipermail/i2c/2007-November/002268.html

Regards,

   Wolfram


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-03-14 11:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 13:43 rt-mutex usage in i2c Sebastian Andrzej Siewior
2015-03-14 11:27 ` Wolfram Sang [this message]
2015-03-14 11:32   ` Wolfram Sang
2015-03-15  7:07     ` Mike Rapoport
     [not found]       ` <CABpLfoiQg1smiebL0=nWX4Sp1H+XD9VViUqGk13gRcfdAwkFoA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-16 20:50         ` Sebastian Andrzej Siewior

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=20150314112703.GD970@katana \
    --to=wsa@the-dreams.de \
    --cc=bigeasy@linutronix.de \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=mike@compulab.co.il \
    --cc=umgwanakikbuti@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;
as well as URLs for NNTP newsgroup(s).