linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: "xulinuxkernel@gmail.com" <xulinuxkernel@gmail.com>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Re: PINCTRL:We May need mutex protect in pinctrl API
Date: Mon, 18 Nov 2013 14:22:09 +0100	[thread overview]
Message-ID: <CACRpkdZg9H+efyZMPAAQX475zcyRx-wzd53jcSe40eASy0Dirw@mail.gmail.com> (raw)
In-Reply-To: <201311071748050629542@gmail.com>

On Thu, Nov 7, 2013 at 10:48 AM, xulinuxkernel@gmail.com
<xulinuxkernel@gmail.com> wrote:

> sorry,our code is not upstream.
> But if two threads come in pinctrl_select_state()  at the same time,
> Is that okay?

Why would two threads come in there at the same time?

We have exactly one pinctrl* handle per device, and we
select the state on it. This is like for example the device
driver would have one thread telling it to go to "default"
state and another thread telling it to go to "idle" or "sleep"
state for example.

If we really have a device driver doing such things
for a good reason, then we need to protect it, but I
want to see that device driver first.

I am quite sure that it's safe to say that the upstream
kernel does not contain a device that will ask the hardware
to move around between different states like this from
different threads, such calls will be serialized by the
nature of sequencing in e.g. runtime PM.

I need to see the device driver and the use case so I
can understand why this would be needed.

I think the need from this arise from an abuse of the
pin controller states.

Yours,
Linus Walleij

  parent reply	other threads:[~2013-11-18 13:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 10:05 [PATCH 0/7] ARM: ux500: More DT only clean-ups for the platform Lee Jones
2013-11-06 10:05 ` [PATCH 1/7] ARM: ux500: Remove legacy ATAG SSP support Lee Jones
2013-11-06 11:58   ` Linus Walleij
2013-11-07 11:47   ` Russell King - ARM Linux
2013-11-07 11:52     ` Lee Jones
2013-11-06 10:05 ` [PATCH 2/7] ARM: ux500: Consolidate [A|D]8500 platform data Lee Jones
2013-11-06 12:01   ` Linus Walleij
2013-11-06 12:04     ` Lee Jones
     [not found]     ` <201311071253281097419@gmail.com>
2013-11-07  9:41       ` PINCTRL:We May need mutex protect in pinctrl API Linus Walleij
     [not found]         ` <201311071748050629542@gmail.com>
2013-11-18 13:22           ` Linus Walleij [this message]
2013-11-06 10:05 ` [PATCH 3/7] ARM: ux500: Remove ATAG support for SDI (MMC) Lee Jones
2013-11-07 11:40   ` Ulf Hansson
2013-11-07 12:07     ` Lee Jones
2013-11-08  9:06       ` Linus Walleij
2013-11-08  9:26         ` Lee Jones
2013-11-08  9:45           ` Linus Walleij
2013-11-07 11:46   ` Russell King - ARM Linux
2013-11-07 11:54     ` Lee Jones
2013-11-06 10:05 ` [PATCH 4/7] ARM: ux500: Clean-up non-DT IRQ initialisation Lee Jones
2013-11-19 20:45   ` Linus Walleij
2013-11-06 10:05 ` [PATCH 5/7] ARM: ux500: Remove unused call to register AMBA devices Lee Jones
2013-11-19 20:54   ` Linus Walleij
2013-11-06 10:05 ` [PATCH 6/7] ARM: ux500: Clean-up legacy extern prototype Lee Jones
2013-11-19 20:56   ` Linus Walleij
2013-11-06 10:05 ` [PATCH 7/7] ARM: ux500: Remove checking for DT during timer init as we are now DT only Lee Jones
2013-11-19 20:58   ` Linus Walleij

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=CACRpkdZg9H+efyZMPAAQX475zcyRx-wzd53jcSe40eASy0Dirw@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xulinuxkernel@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).