From: Grygorii Strashko <grygorii.strashko@ti.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Alexander Stein <alexander.stein@systec-electronic.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: Wed, 6 Apr 2016 18:42:31 +0300 [thread overview]
Message-ID: <57052E67.4050206@ti.com> (raw)
In-Reply-To: <CACRpkdbzRPfEgdcPrQzDBQxVUnpdJFoGSFqeQ82tohfCAE11_g@mail.gmail.com>
On 04/06/2016 04:39 PM, Linus Walleij wrote:
> On Mon, Apr 4, 2016 at 6:21 PM, Grygorii Strashko
> <grygorii.strashko@ti.com> wrote:
>
>> Below is RFC patch to prove above consent. I've had offlist
>> debugging session with Alexander and He mentioned that this change
>> fixes boot issue for him.
>
> Thanks for looking into this.
>
>> Of course, there are some question to discuss:
>> 1) [+] It should sync initialization of GPIOchip and GPIOirqchip
>> 2) [+] This approach requires changes in gpiolib/gpio drivers only, from other side
>> It will require to add fixes all over the Kernel if gpiod_to_irq() will
>> start returning -EPROBE_DEFER.
>
> Yes, so it will need to be cross-coordinated with IRQ maintainers
> Marc and TGLX.
Seems, I have to study how to be more clear :(
This +/- are all about my RFC patch.
My patch limits the scope of problem to GPIO subsystem/drivers only.
As opposite, if we will touch gpiod_to_irq() - it will affect on whole
kernel.
>
>> 3) [-] has_irq might need to be initialized by non-DT drivers
>
> Yes. Every driver in the kernel need to be audited.
With my patch only GPIO drivers need to be checked, especially GPIO
drivers which:
- are non-DT based;
- do not use GPIO irq helpers
- can make IRQ functionality optional using Kconfig/sysfs/module parameters
>
>> 4) [-] irq_ready might need to be set manually by drivers which do not use GPIO irq
>> helpers (see change in gpio-mpc8xxx.c)
>
> Yes. That too. Every driver in the kernel need to be audited.
>
>> 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.
>
>> job done with commit e6918cd 'gpiolib: handle probe deferrals better'
>> reverted.
>
> I have taken that out of my tree as well. My naive approach
> doesn't work.
>
--
regards,
-grygorii
next prev parent reply other threads:[~2016-04-06 15:43 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 [this message]
2016-04-07 17:09 ` Linus Walleij
2016-04-11 6:10 ` Alexander Stein
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=57052E67.4050206@ti.com \
--to=grygorii.strashko@ti.com \
--cc=acourbot@nvidia.com \
--cc=alexander.stein@systec-electronic.com \
--cc=bjorn.andersson@linaro.org \
--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 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).