mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regmap: allow to disable all locking mechanisms
Date: Tue, 12 Dec 2017 11:25:28 +0000	[thread overview]
Message-ID: <20171212112528.GE16323@sirena.org.uk> (raw)
In-Reply-To: <CAHp75VcUBFq4gRe_NwEfDqAkGrTLSK8ZY0B3UTuYOOxUBRQdbA@mail.gmail.com>

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

On Tue, Dec 12, 2017 at 01:12:05PM +0200, Andy Shevchenko wrote:
> On Sun, Dec 10, 2017 at 5:14 PM, Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> >>> +static void regmap_lock_unlock_empty(void *__map)

> >> ..._none()?

> > Too late, Mark already applied it.

> Ah, Mark always works at speed of light!

An incremental patch is always possible.

> >> Why not to introduce positive switch, namely
> >>  bool mutex_lock; // choose better name
> >> and assign ..._none() by default?

> > Because we don't want to break all the existing regmaps, if map->lock
> > or map->unlock is empty, regmap core decides internally whether to use
> > a mutex or a spinlock.

> Good point.
> So, it means the options like: nomutex (false — mutex is in use) or
> nolock (true — disable locking).
> From those the latter looks better to me and IIUC you went that way.

Yup.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2017-12-12 11:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 14:26 Bartosz Golaszewski
2017-12-06 15:33 ` Applied "regmap: allow to disable all locking mechanisms" to the regmap tree Mark Brown
2017-12-10 13:10 ` [PATCH] regmap: allow to disable all locking mechanisms Andy Shevchenko
2017-12-10 15:14   ` Bartosz Golaszewski
2017-12-12 11:12     ` Andy Shevchenko
2017-12-12 11:25       ` Mark Brown [this message]
2017-12-12 11:42 ` Lars-Peter Clausen
2017-12-12 12:18   ` Mark Brown
2017-12-12 12:21     ` Bartosz Golaszewski
2017-12-12 15:56       ` Mark Brown

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=20171212112528.GE16323@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®