linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Paul Walmsley <paul@pwsan.com>,
	linux-serial@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
	Pantelis Antoniou <pantelis.antoniou@gmail.com>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Felipe Balbi <balbi@ti.com>,
	mporter@ti.com, Kevin Hilman <khilman@ti.com>,
	"Govindraj.R" <govindraj.raja@ti.com>
Subject: Re: [PATCH] tty: omap-serial: fix boot hang by converting to use a threaded IRQ handler (was Re: [PATCH] irq: always set IRQF_ONESHOT if no primary handler is specified)
Date: Tue, 23 Aug 2011 09:13:55 -0700	[thread overview]
Message-ID: <CA+55aFyFzzd2GBbwFYrXMK353UE4tdrdZ5Lt8=qEwaaMJvStnA@mail.gmail.com> (raw)
In-Reply-To: <20110823095711.058d9cf4@lxorguk.ukuu.org.uk>

On Tue, Aug 23, 2011 at 1:57 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Mon, 22 Aug 2011 23:10:21 -0600 (MDT)
> Paul Walmsley <paul@pwsan.com> wrote:
>
>>
>> Convert the omap-serial hardirq handler to a threaded IRQ handler. Without
>> this patch, OMAP boards which use the on-board OMAP UARTs and the
>> omap-serial driver will not boot to userspace after commit
>> f3637a5f2e2eb391ff5757bc83fb5de8f9726464 ("irq: Always set IRQF_ONESHOT if
>> no primary handler is specified").  Enabling CONFIG_DEBUG_SHIRQ reveals
>> 'IRQ handler type mismatch' errors:
>
> There are multiple other drivers reporting all these problems - the
> faulty irq change should be reverted at this point not the drivers
> fiddled with.

Agreed. It's too late to try to fix random drivers.

The real issue seems to be that clue:

    "Enabling CONFIG_DEBUG_SHIRQ reveals 'IRQ handler type mismatch' errors"

iow, we have a shared irq, and forcing the IRQF_ONESHOT bit is
resulting in those shared interrupts now having different values of
IRQF_ONESHOT, so this test triggers:

                /*
                 * Can't share interrupts unless both agree to and are
                 * the same type (level, edge, polarity). So both flag
                 * fields must have IRQF_SHARED set and the bits which
                 * set the trigger type must match. Also all must
                 * agree on ONESHOT.
                 */
                if (!((old->flags & new->flags) & IRQF_SHARED) ||
                    ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK) ||
                    ((old->flags ^ new->flags) & IRQF_ONESHOT)) {
                        old_name = old->name;
                        goto mismatch;
                }

and the irq isn't installed at all (setup_irq returns with EBUSY).

So the commit that caused this problem was simply bogus. The commit log says

                       "Since it is required for those users and
    there is no difference for others it makes sense to add this flag
    unconditionally."

but the "there is no difference for others" seems to be total crap,
exactly because it results in this IRQF mismatch.

So I think that commit should just be reverted. Thomas?

                           Linus

  reply	other threads:[~2011-08-23 16:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 20:32 [PATCH] irq: always set IRQF_ONESHOT if no primary handler is specified Sebastian Andrzej Siewior
2011-07-28  9:39 ` [tip:irq/urgent] irq: Always " tip-bot for Sebastian Andrzej Siewior
2011-08-18 17:01 ` [PATCH] irq: always " Pantelis Antoniou
2011-08-18 17:22   ` Sebastian Andrzej Siewior
2011-08-18 21:34     ` Felipe Balbi
2011-08-19  7:25       ` Sebastian Andrzej Siewior
2011-08-19 10:13         ` Felipe Balbi
2011-08-22 23:45       ` Paul Walmsley
2011-08-23  5:10         ` [PATCH] tty: omap-serial: fix boot hang by converting to use a threaded IRQ handler (was Re: [PATCH] irq: always set IRQF_ONESHOT if no primary handler is specified) Paul Walmsley
2011-08-23  8:14           ` Sebastian Andrzej Siewior
2011-08-23  8:57           ` Alan Cox
2011-08-23 16:13             ` Linus Torvalds [this message]
2011-08-23 16:46               ` Thomas Gleixner
2011-08-23  9:12           ` Felipe Balbi
2011-08-23 17:21             ` Paul Walmsley
2011-08-23  9:09         ` [PATCH] irq: always set IRQF_ONESHOT if no primary handler is specified Felipe Balbi
2011-08-22 23:26   ` Paul Walmsley

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='CA+55aFyFzzd2GBbwFYrXMK353UE4tdrdZ5Lt8=qEwaaMJvStnA@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=balbi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=govindraj.raja@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mporter@ti.com \
    --cc=pantelis.antoniou@gmail.com \
    --cc=paul@pwsan.com \
    --cc=tglx@linutronix.de \
    /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).