linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Sullivan <nathan.sullivan@ni.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-rt-users@vger.kernel.org, msmucr@gmail.com, bigeasy@linutronix.de
Subject: Re: [PATCH] genirq: Handle force threading of irqs with primary and thread handler
Date: Mon, 21 Sep 2015 10:04:33 -0500	[thread overview]
Message-ID: <20150921150433.GA3460@nathan3500-linux-VM> (raw)
In-Reply-To: <alpine.DEB.2.11.1509211101190.5606@nanos>

On Mon, Sep 21, 2015 at 11:04:31AM +0200, Thomas Gleixner wrote:
> Force threading of interrupts does not deal with interrupts which are
> requested with a primary and a threaded handler. The current policy is
> to leave them alone and let the primary handler run in interrupt
> context, but we set the ONESHOT flag for those interrupts as well.
> 
> Kohji Okuno debugged a problem with the SDHCI driver where the
> interrupt thread waits for a hardware interrupt to trigger, which cant
> work well because the hardware interrupt is masked due to the ONESHOT
> flag being set. He proposed to set the ONESHOT flag only if the
> interrupt does not provide a thread handler.
> 
> Though that does not work either because these interrupts can be
> shared. So the other interrupt would rightfully get the ONESHOT flag
> set and therefor the same situation would happen again.
> 
> To deal with this proper, we need to force thread the primary handler
> of such interrupts as well. That means that the primary interrupt
> handler is treated as any other primary interrupt handler which is not
> marked IRQF_NO_THREAD. The threaded handler becomes a separate thread
> so the SDHCI flow logic can be handled gracefully.
> 
> The same issue was reported against 4.1-rt.
> 
> Reported-by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
> Reported-By: Michal Šmucr <msmucr@gmail.com>
> Reported-by: Nathan Sullivan <nathan.sullivan@ni.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> 
> This requires to revert commit: d04ea10ba1ea 'mmc: sdhci: don't provide
> hard irq handler'
> 

Tested on an Intel Bay Trail system with ath6kl SDIO wireless, works fine.

Tested-by: Nathan Sullivan <nathan.sullivan@ni.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2015-09-21 15:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21  9:04 [PATCH] genirq: Handle force threading of irqs with primary and thread handler Thomas Gleixner
2015-09-21 15:04 ` Nathan Sullivan [this message]

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=20150921150433.GA3460@nathan3500-linux-VM \
    --to=nathan.sullivan@ni.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=msmucr@gmail.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).