All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@systec-electronic.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Linux Input <linux-input@vger.kernel.org>,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH] gpiolib: handle probe deferrals better
Date: Mon, 11 Apr 2016 08:10:14 +0200	[thread overview]
Message-ID: <2011375.YUICgDcM4E@ws-stein> (raw)
In-Reply-To: <CACRpkdZYyZG9=mXdWi3bnfvOqc6LFE1FykTU-QirQOJLv=Z2=A@mail.gmail.com>

On Thursday 07 April 2016 19:09:06, Linus Walleij wrote:
> >>> 4) irq_ready access synchronization on SMP? atomic?
> >> 
> >> Uhhh.... I don't even understand the question.
> > 
> > in my patch the irq_ready is set from _gpiochip_irqchip_add() and
> > read from gpiod_request() without any kind of protection and those
> > two functions can be executed in parallel.
> 
> Aha. Well I don't know if that is really a big problem?
> Does that really happen in practice?

I guess this is what actually happens in my case. The gpio controller has 
already been registred and the companion irq chip is about to be registered.
Meanwhile gpio-keys requests a GPIO from that recently registred gpio 
controller and the following gpio_to_irq or irq_request returns 0 or fails as 
the irq chip has not been registred yet (without Grygorii's patch). So this 
calling situation might actually happen.

Best regards,
Alexander


      reply	other threads:[~2016-04-11  6:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 11:44 [PATCH] gpiolib: handle probe deferrals better Linus Walleij
2016-04-01 12:16 ` Alexander Stein
2016-04-01 13:03   ` Linus Walleij
2016-04-01 13:42     ` Alexander Stein
2016-04-01 14:03       ` Grygorii Strashko
2016-04-01 14:35         ` Alexander Stein
2016-04-01 14:04     ` Guenter Roeck
2016-04-01 17:52     ` Bjorn Andersson
2016-04-01 12:42 ` Guenter Roeck
2016-04-01 13:28 ` Grygorii Strashko
2016-04-04 16:21   ` Grygorii Strashko
2016-04-06 13:39     ` Linus Walleij
2016-04-06 15:42       ` Grygorii Strashko
2016-04-07 17:09         ` Linus Walleij
2016-04-11  6:10           ` Alexander Stein [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=2011375.YUICgDcM4E@ws-stein \
    --to=alexander.stein@systec-electronic.com \
    --cc=acourbot@nvidia.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tomeu.vizoso@collabora.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.