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: PINCTRL:We May need mutex protect in pinctrl API
Date: Thu, 7 Nov 2013 10:41:02 +0100	[thread overview]
Message-ID: <CACRpkdYUKKLvMWcSxb24ZvYUq1QMzs9cw-h5CpZ1Q5S2s3RVBQ@mail.gmail.com> (raw)
In-Reply-To: <201311071253281097419@gmail.com>

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

> Recently, our company use kernel 3.10 instead of 3.8.When we test the kernel
> we found there would be hang up in pinctrl subsystem,the reason may be as
> following,
> In out system,nand and spi pins are some of the same,so we need frequently
> get pinctrl and put pinctrl. and sd card also frequently get and put
> pinctrl.
> when the nand and sd card both come in
> pinctrl_lookup_state

If you're repeatedly doing pinctrl_lookup_state() in your driver,
then *this* is the problem, not that the pinctrl_lookup_state()
is not mutexed.

You should lookup your states at probe() and at runtime
only use pinctrl_select_state() to move between different
states.

Can you please refer me to the code in the upstream kernel
that is causing this.

If your code is not upstream and you're abusing the interface
as described above, the actual problem you have is that
you need to get your code upstream and properly reviewed
by the community.

Yours,
Linus Walleij

  parent reply	other threads:[~2013-11-07  9:41 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       ` Linus Walleij [this message]
     [not found]         ` <201311071748050629542@gmail.com>
2013-11-18 13:22           ` Re: PINCTRL:We May need mutex protect in pinctrl API Linus Walleij
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=CACRpkdYUKKLvMWcSxb24ZvYUq1QMzs9cw-h5CpZ1Q5S2s3RVBQ@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).