From: Pavel Machek <pavel@ucw.cz>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Tony Lindgren <tony@atomide.com>
Subject: Re: [GIT pull] irq updates for 4.13
Date: Mon, 10 Jul 2017 21:38:56 +0200 [thread overview]
Message-ID: <20170710193856.GA14693@amd> (raw)
In-Reply-To: <CA+55aFz5=ubNvhTUTzk3kFuLMFToP7xh7h8NDXDor9w+cjsCBA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3209 bytes --]
Hi!
> > This patch apparently breaks OMAP platform:
> >
> > 46e48e257360f0845fe17089713cbad4db611e70 is the first bad commit
> > commit 46e48e257360f0845fe17089713cbad4db611e70
> > Author: Thomas Gleixner <tglx@linutronix.de>
> > Date: Thu Jun 29 23:33:38 2017 +0200
> >
> > genirq: Move irq resource handling out of spinlocked region
> >
> > Boot failure log from Droid 4:
> > [ ... snip snip ..]
> >
> > Droid 4 boots current master again after applying the patch below
> > (which is git revet of above patch, but I provide the patch, since
> > it did not revet cleanly).
>
> Hmm. Do you actually need the full revert?
>
> I think it's only the __setup_irq() part that looks like it may be garbage.
>
> For example, I think it releases the resources twice if the
> __irq_set_trigger() call fails.
>
> But it looks questionably in other ways too - notably, the change to
> make the request call be in the same context as the freeing is done is
> apparently done entirely for symmetry reasons, not for any actual
> *reason* reasons.
>
> So I suspect just the __setup_irq() parts should be reverted, because
> they look both buggy and pointless. But the actual *real* part of the
> patch was the two-liner __free_irq() part, and that looks sane to me.
>
> So Sebastian, can you test if it's ok to revert just the __setup_irq()
> part, but leave the smaller part in __free_irq() that just moves the
> irq_release_resources() around at freeing time?
If I understood it correctly, you wanted to test this:
And yes, this is enough to fix boot on N900 for me.
Thanks,
Pavel
commit 285358d48dec82f13fa76724bff434897883d188
Author: Pavel <pavel@ucw.cz>
Date: Mon Jul 10 21:35:25 2017 +0200
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 5624b2d..528bfc3 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1168,14 +1168,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
new->flags &= ~IRQF_ONESHOT;
mutex_lock(&desc->request_mutex);
- if (!desc->action) {
- ret = irq_request_resources(desc);
- if (ret) {
- pr_err("Failed to request resources for %s (irq %d) on irqchip %s\n",
- new->name, irq, desc->irq_data.chip->name);
- goto out_mutex;
- }
- }
chip_bus_lock(desc);
@@ -1279,6 +1271,13 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
}
if (!shared) {
+ ret = irq_request_resources(desc);
+ if (ret) {
+ pr_err("Failed to request resources for %s (irq %d) on irqchip %s\n",
+ new->name, irq, desc->irq_data.chip->name);
+ goto out_unlock;
+ }
+
init_waitqueue_head(&desc->wait_for_threads);
/* Setup the type (level, edge polarity) if configured: */
@@ -1387,10 +1386,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
chip_bus_sync_unlock(desc);
- if (!desc->action)
- irq_release_resources(desc);
-
-out_mutex:
mutex_unlock(&desc->request_mutex);
out_thread:
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-07-10 19:38 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-09 8:49 [GIT pull] irq updates for 4.13 Thomas Gleixner
2017-07-10 13:35 ` Sebastian Reichel
2017-07-10 17:01 ` Linus Torvalds
2017-07-10 19:38 ` Pavel Machek [this message]
2017-07-10 20:15 ` Sebastian Reichel
2017-07-10 21:29 ` Linus Torvalds
2017-07-11 6:55 ` Thomas Gleixner
2017-07-11 9:26 ` Sebastian Reichel
2017-07-11 9:55 ` Thomas Gleixner
2017-07-11 10:52 ` Thomas Gleixner
2017-07-11 11:21 ` Sebastian Reichel
2017-07-11 13:27 ` Thomas Gleixner
2017-07-11 13:51 ` Marc Zyngier
2017-07-11 14:39 ` Sebastian Reichel
2017-07-11 9:47 ` Thomas Gleixner
2017-07-11 13:51 ` Tony Lindgren
2017-07-11 14:41 ` Thomas Gleixner
2017-07-11 15:07 ` Thomas Gleixner
2017-07-11 15:43 ` Tony Lindgren
2017-07-11 15:39 ` Grygorii Strashko
2017-07-11 16:17 ` Tony Lindgren
2017-07-12 8:00 ` Geert Uytterhoeven
2017-07-11 15:40 ` Linus Torvalds
2017-07-11 16:14 ` Sebastian Reichel
2017-07-11 16:15 ` Tony Lindgren
2017-07-11 17:17 ` Thomas Gleixner
2017-07-11 17:39 ` Tony Lindgren
2017-07-11 16:19 ` Thomas Gleixner
2017-07-11 16:31 ` Linus Torvalds
2017-07-11 17:52 ` Thomas Gleixner
2017-07-11 18:16 ` Linus Torvalds
2017-07-11 21:30 ` Sebastian Reichel
2017-07-11 21:41 ` Thomas Gleixner
2017-07-11 22:04 ` Linus Torvalds
2017-07-11 22:51 ` Sebastian Reichel
2017-07-12 5:29 ` Tony Lindgren
2017-07-15 20:24 ` Pavel Machek
2017-07-17 6:21 ` Tony Lindgren
2017-07-17 20:01 ` Linus Torvalds
2017-07-17 21:33 ` Pavel Machek
2017-07-11 16:34 ` Tony Lindgren
2017-07-11 14:41 ` Sebastian Reichel
2017-07-11 16:20 ` Tony Lindgren
2017-07-11 16:34 ` Sebastian Reichel
-- strict thread matches above, loose matches on Subject: below --
2017-07-03 7:42 Thomas Gleixner
2017-07-04 0:00 ` Linus Torvalds
2017-07-04 8:12 ` Thomas Gleixner
2017-07-04 10:29 ` Thomas Gleixner
2017-07-04 15:17 ` Jens Axboe
2017-07-04 18:34 ` Linus Torvalds
2017-07-04 19:10 ` Thomas Gleixner
2017-07-04 20:48 ` Max Gurtovoy
2017-07-06 13:58 ` Max Gurtovoy
2017-07-04 21:56 ` Jens Axboe
2017-07-05 15:14 ` Christoph Hellwig
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=20170710193856.GA14693@amd \
--to=pavel@ucw.cz \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sebastian.reichel@collabora.co.uk \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
--cc=torvalds@linux-foundation.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