All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-kernel@vger.kernel.org,
	Vadim Pasternak <vadimp@mellanox.com>,
	Michael Shych <michaelsh@mellanox.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Akinobu Mita <akinobu.mita@gmail.com>,
	Jean Delvare <jdelvare@suse.com>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH 1/5] i2c: smbus: add unlocked __i2c_smbus_xfer variant
Date: Tue, 26 Jun 2018 13:54:01 +0200	[thread overview]
Message-ID: <79E4A06C-26EF-4FF4-AFEA-7E7769FDF995@axentia.se> (raw)
In-Reply-To: <20180626023757.l54suaryim2fieq3@ninjato>

On June 26, 2018 4:37:58 AM GMT+02:00, Wolfram Sang <wsa@the-dreams.de> wrote:
>
>> This is not perfectly equivalent, since i2c_smbus_xfer was callable
>from
>> atomic/irq context if you happened to end up emulating SMBus with an
>I2C
>> transfer, and that is no longer the case with this patch. It is
>unknown
>> (to me) if anything depends on that quirk, but it seems fragile
>enough to
>> simply break those cases and require them to call i2c_transfer
>directly
>> instead.
>
>Couldn't we just add the same trylock-code path here as well? I always
>wondered why I2C and SMBus were not in sync when it came to that. Yet,
>I
>didn't want to change the code for no reason, but it seems we now have
>one?
>
>Rest of the series looks good to me, very nice diffstat!

I don't think it's that easy as I just thought about another problem with lifting the locking from the emulation function. It calls kzalloc(..., GFP_KERNEL), at least in some cases, and that's not a very good idea from atomic/irq context...

Cheers,
Peter

  reply	other threads:[~2018-06-26 11:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20  8:51 [PATCH 0/5] i2c: smbus: add unlocked __i2c_smbus_xfer variant Peter Rosin
2018-06-20  8:51 ` [PATCH 1/5] " Peter Rosin
2018-06-26  2:37   ` Wolfram Sang
2018-06-26 11:54     ` Peter Rosin [this message]
2018-06-26 13:46       ` Wolfram Sang
2018-06-27  4:18         ` Peter Rosin
2018-06-27  7:08           ` Wolfram Sang
2018-07-01 12:13             ` Wolfram Sang
2018-07-01 16:40               ` Peter Rosin
2018-06-20  8:51 ` [PATCH 2/5] i2c: mux: mlxcpld: make use of __i2c_smbus_xfer Peter Rosin
2018-06-20  9:11   ` Michael Shych
2018-06-20  8:51 ` [PATCH 3/5] i2c: mux: pca9541: " Peter Rosin
2018-06-20  8:51 ` [PATCH 4/5] i2c: mux: pca954x: " Peter Rosin
2018-06-20  8:51 ` [PATCH 5/5] i2c: mux: " Peter Rosin
2018-07-03 21:01 ` [PATCH 0/5] i2c: smbus: add unlocked __i2c_smbus_xfer variant Wolfram Sang

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=79E4A06C-26EF-4FF4-AFEA-7E7769FDF995@axentia.se \
    --to=peda@axentia.se \
    --cc=akinobu.mita@gmail.com \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=michaelsh@mellanox.com \
    --cc=vadimp@mellanox.com \
    --cc=wsa@the-dreams.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.