From: Thomas Gleixner <tglx@linutronix.de>
To: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: linux-kernel@vger.kernel.org, briannorris@chromium.org,
dianders@chromium.org, tfiga@chromium.org
Subject: Re: [PATCH v3] genirq: Check irq disabled & masked states in irq_shutdown
Date: Sat, 27 May 2017 13:12:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1705271237280.2329@nanos> (raw)
In-Reply-To: <1495879508-17491-1-git-send-email-jeffy.chen@rock-chips.com>
On Sat, 27 May 2017, Jeffy Chen wrote:
> If a irq is already disabled, irq_shutdown may try to disable it again,
> for example:
> devm_request_irq->irq_startup->irq_enable
> disable_irq <-- disabled
> devm_free_irq->irq_shutdown <-- disable it again
>
> This would confuse some chips which require balanced irq enable and
> disable, for example pinctrl-rockchip & pinctrl-nomadik.
"would confuse" is an interesting technical term. Can you please start to
explain things in coherent sentences so people who do not have detailed
knowledge of the problem at hand can understand it?
> Add a state check before calling irq_disable to prevent that.
So you analyzed in half an hour that all of this is correct and fixes all
possible imbalances, right? Really impressive!
You just forgot to mention this in the changelog.
> v2: Rewrite commit message.
> v3: Rewrite commit message and not skip irq_shutdown.
This does not belong into the changelog and having that information twice
is more than pointless.
Before you send yet another version of this within 5 minutes, can you
please sit down and analyze all the possible imbalance scenarios?
I'm not going to apply hastiliy cobbled together workarounds which "fix"
just half of the problem space. This is not random driver code which breaks
ONE type of machine. This is core code which has the potential to break ALL
machines out there in one go.
Either you come up with a properly analyzed solution which addresses all
possible imbalanced invocations or you have to wait until I find some time
to look at it myself.
Thanks,
tglx
next prev parent reply other threads:[~2017-05-27 11:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 10:05 [PATCH v3] genirq: Check irq disabled & masked states in irq_shutdown Jeffy Chen
2017-05-27 11:12 ` Thomas Gleixner [this message]
2017-05-27 15:11 ` Tomasz Figa
2017-05-29 6:56 ` Thomas Gleixner
[not found] ` <tivl20goiv96pkmvncdkqvud.1496054861146@email.android.com>
2017-05-30 23:02 ` Thomas Gleixner
2017-06-26 6:22 ` jeffy
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=alpine.DEB.2.20.1705271237280.2329@nanos \
--to=tglx@linutronix.de \
--cc=briannorris@chromium.org \
--cc=dianders@chromium.org \
--cc=jeffy.chen@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tfiga@chromium.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