All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Sebastian Reichel <sre@kernel.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serdev: Restore serdev_device_write_buf for atomic context
Date: Thu, 4 May 2017 15:32:53 -0500	[thread overview]
Message-ID: <CAL_JsqLCiyU8kU2NaLQRz9aS-k7TNr3Tf45Wt3H3DuSyMAuvDg@mail.gmail.com> (raw)
In-Reply-To: <b62674e7-5c50-585b-eade-7cef0a400d02@i2se.com>

On Thu, May 4, 2017 at 11:22 AM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Am 02.05.2017 um 15:18 schrieb Johan Hovold:
>> On Tue, May 02, 2017 at 07:41:34AM -0500, Rob Herring wrote:
>>> On Tue, May 2, 2017 at 4:06 AM, Johan Hovold <johan@kernel.org> wrote:
>>>> On Fri, Apr 28, 2017 at 01:47:21PM +0200, Stefan Wahren wrote:
>>>>> Starting with commit 6fe729c4bdae ("serdev: Add serdev_device_write
>>>>> subroutine") the function serdev_device_write_buf cannot be used in
>>>>> atomic context anymore (mutex_lock is sleeping). So restore the old
>>>>> behavior.
>>>> Yeah, preventing use in atomic context seems unnecessary, although any
>>>> clients writing must now deal with serialisation themselves (as before,
>>>> and as they should).
>>> We could just remove the mutex for serdev_device_write and always make
>>> the client responsible for serialization.
>> That sounds reasonable.
>
> So it's unwanted to have 2 write functions (non-atomic, atomic)?

No, it's unwanted to have more than we need.

Looking closer, we'd also have to ensure the wait for completion is
not called also. So probably better to just leave it as you have done
it.

Acked-by: Rob Herring <robh@kernel.org>

Rob

  reply	other threads:[~2017-05-04 20:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 11:47 [PATCH] serdev: Restore serdev_device_write_buf for atomic context Stefan Wahren
2017-05-02  9:06 ` Johan Hovold
2017-05-02 12:41   ` Rob Herring
2017-05-02 13:18     ` Johan Hovold
2017-05-04 16:22       ` Stefan Wahren
2017-05-04 20:32         ` Rob Herring [this message]
2017-05-08 15:18           ` Johan Hovold
2017-05-17 11:38             ` Stefan Wahren
2017-05-17 12:46               ` Greg Kroah-Hartman

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=CAL_JsqLCiyU8kU2NaLQRz9aS-k7TNr3Tf45Wt3H3DuSyMAuvDg@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=sre@kernel.org \
    --cc=stefan.wahren@i2se.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 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.