public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: Johan Hovold <johan@kernel.org>, Rob Herring <robh@kernel.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: Wed, 17 May 2017 14:46:14 +0200	[thread overview]
Message-ID: <20170517124614.GA20598@kroah.com> (raw)
In-Reply-To: <8a24cad2-26d7-3394-509a-a0c038345d13@i2se.com>

On Wed, May 17, 2017 at 01:38:40PM +0200, Stefan Wahren wrote:
> Hi Greg,
> 
> Am 08.05.2017 um 17:18 schrieb Johan Hovold:
> > On Thu, May 04, 2017 at 03:32:53PM -0500, Rob Herring wrote:
> >> 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.
> > Indeed. Sorry if my reply above was unclear on that point (i.e. that
> > Stefan's patch is still needed regardless of whether we keep the mutex
> > or not).
> >
> > Thanks,
> > Johan
> 
> are you okay with this patch and can you please apply it?

I'll work to catch up on tty/serial patches soon...

      reply	other threads:[~2017-05-17 12:46 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
2017-05-08 15:18           ` Johan Hovold
2017-05-17 11:38             ` Stefan Wahren
2017-05-17 12:46               ` Greg Kroah-Hartman [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=20170517124614.GA20598@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --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=robh@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox