From: Kevin Hilman <khilman@kernel.org>
To: Bin Liu <b-liu@ti.com>, Judith Mendez <jm@ti.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND v2] gpio: omap: Add omap_gpio_disable/enable_irq calls
Date: Tue, 05 Nov 2024 16:06:44 -0800 [thread overview]
Message-ID: <7hy11xjkdn.fsf@baylibre.com> (raw)
In-Reply-To: <20241105190005.cg6dpeedbirgflqm@iaqt7>
Bin Liu <b-liu@ti.com> writes:
> On Tue, Nov 05, 2024 at 12:47:58PM -0600, Judith Mendez wrote:
>> Hi Kevin,
>>
>> On 11/1/24 9:29 AM, Kevin Hilman wrote:
>> > Hi Judith,
>> >
>> > Judith Mendez <jm@ti.com> writes:
>> >
>> > > From: Bin Liu <b-liu@ti.com>
>> > >
>> > > Add omap_gpio_disable_irq and omap_gpio_enable_irq
>> > > calls in gpio-omap.
>> > >
>> > > Currently, kernel cannot disable gpio interrupts in
>> > > case of a irq storm, so add omap_gpio_disable/enable_irq
>> > > so that interrupts can be disabled/enabled.
>> > >
>> > > Signed-off-by: Bin Liu <b-liu@ti.com>
>> > > [Judith: Add commit message]
>> > > Signed-off-by: Judith Mendez <jm@ti.com>
>> >
>> > Thanks for this patch. Can you give a bit more context on the
>> > problem(s) this solves and on which SoCs/platforms it was
>> > developed/validated?
>>
>> Sorry for the late response. Patch was tested/developed on am335x
>> device BBB, If you feed a PWM signal at 200KHz frequency to
>> GPIO, and execute gpiomon 0 12 &, Linux will be unresponsive
>> even after CTRL+C without these 2 functions in this patch. Once
>> this patch is applied, you can get console back after hitting
>> CTRL+C and then proceed to kill gpiomon.
>
> In addtion to Judith's explanation, when the PWM is applied to a GPIO
> pin, kernel detects the interrupt storm and disables the irq, however,
> without these callbacks, this gpio platform driver doesn't really
> disable the interrupt in the gpio controller, so the interrupt storm is
> still happening and handled by this gpio controller driver then causes
> Linux unresponsive.
Excellent! Thank you both for the detailed explanations.
Kevin
next prev parent reply other threads:[~2024-11-06 0:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 14:56 [PATCH RESEND v2] gpio: omap: Add omap_gpio_disable/enable_irq calls Judith Mendez
2024-11-01 14:29 ` Kevin Hilman
2024-11-05 18:47 ` Judith Mendez
2024-11-05 19:00 ` Bin Liu
2024-11-06 0:06 ` Kevin Hilman [this message]
2024-11-06 13:42 ` Bartosz Golaszewski
2024-11-08 15:43 ` Judith Mendez
2024-11-06 0:07 ` Kevin Hilman
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=7hy11xjkdn.fsf@baylibre.com \
--to=khilman@kernel.org \
--cc=b-liu@ti.com \
--cc=brgl@bgdev.pl \
--cc=jm@ti.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=ssantosh@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