All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] genirq: provide means to retrigger parent
Date: Tue, 23 Oct 2012 15:23:04 -0700	[thread overview]
Message-ID: <871ugo7rqv.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20121016221502.GY28061@n2100.arm.linux.org.uk> (Russell King's message of "Tue, 16 Oct 2012 23:15:02 +0100")

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> On Tue, Oct 16, 2012 at 03:07:49PM -0700, Kevin Hilman wrote:
>> From: Thomas Gleixner <tglx@linutronix.de>
>> 
>> Attempts to retrigger nested threaded IRQs currently fail because they
>> have no primary handler.  In order to support retrigger of nested
>> IRQs, the parent IRQ needs to be retriggered.
>> 
>> To fix, when an IRQ needs to be resent, if the interrupt has a parent
>> IRQ and runs in the context of the parent IRQ, then resend the parent.
>> 
>> Also, handle_nested_irq() needs to clear the replay flag like the
>> other handlers, otherwise check_irq_resend() will set it and it will
>> never be cleared.  Without clearing, it results in the first resend
>> working fine, but check_irq_resend() returning early on subsequent
>> resends because the replay flag is still set.
>> 
>> Problem discovered on ARM/OMAP platforms where a nested IRQ that's
>> also a wakeup IRQ happens late in suspend and needed to be retriggered
>> during the resume process.
>> 
>> Reported-by: Kevin Hilman <khilman@ti.com>
>> Tested-by: Kevin Hilman <khilman@ti.com>
>> [khilman@ti.com: changelog edits, clear IRQS_REPLAY in handle_nested_irq()]
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> Umm, we also have the converse situation.  We have platforms where the
> resend has to be done from the child IRQ, and the parent must not be
> touched.  I hope that doesn't break those.

I'm assuming the child IRQs you're concerned with are not threaded,
right?  This patch only addresses nested, threaded IRQs, and these don't
have a primary handler to run at all, so cannot do any triggering.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] genirq: provide means to retrigger parent
Date: Tue, 23 Oct 2012 15:23:04 -0700	[thread overview]
Message-ID: <871ugo7rqv.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20121016221502.GY28061@n2100.arm.linux.org.uk> (Russell King's message of "Tue, 16 Oct 2012 23:15:02 +0100")

Russell King - ARM Linux <linux@arm.linux.org.uk> writes:

> On Tue, Oct 16, 2012 at 03:07:49PM -0700, Kevin Hilman wrote:
>> From: Thomas Gleixner <tglx@linutronix.de>
>> 
>> Attempts to retrigger nested threaded IRQs currently fail because they
>> have no primary handler.  In order to support retrigger of nested
>> IRQs, the parent IRQ needs to be retriggered.
>> 
>> To fix, when an IRQ needs to be resent, if the interrupt has a parent
>> IRQ and runs in the context of the parent IRQ, then resend the parent.
>> 
>> Also, handle_nested_irq() needs to clear the replay flag like the
>> other handlers, otherwise check_irq_resend() will set it and it will
>> never be cleared.  Without clearing, it results in the first resend
>> working fine, but check_irq_resend() returning early on subsequent
>> resends because the replay flag is still set.
>> 
>> Problem discovered on ARM/OMAP platforms where a nested IRQ that's
>> also a wakeup IRQ happens late in suspend and needed to be retriggered
>> during the resume process.
>> 
>> Reported-by: Kevin Hilman <khilman@ti.com>
>> Tested-by: Kevin Hilman <khilman@ti.com>
>> [khilman at ti.com: changelog edits, clear IRQS_REPLAY in handle_nested_irq()]
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> Umm, we also have the converse situation.  We have platforms where the
> resend has to be done from the child IRQ, and the parent must not be
> touched.  I hope that doesn't break those.

I'm assuming the child IRQs you're concerned with are not threaded,
right?  This patch only addresses nested, threaded IRQs, and these don't
have a primary handler to run at all, so cannot do any triggering.

Kevin

  reply	other threads:[~2012-10-23 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16 22:07 [PATCH] genirq: provide means to retrigger parent Kevin Hilman
2012-10-16 22:07 ` Kevin Hilman
2012-10-16 22:15 ` Russell King - ARM Linux
2012-10-16 22:15   ` Russell King - ARM Linux
2012-10-23 22:23   ` Kevin Hilman [this message]
2012-10-23 22:23     ` Kevin Hilman
2012-10-23 22:36     ` Thomas Gleixner
2012-10-23 22:36       ` Thomas Gleixner
2012-11-01 21:36 ` [tip:irq/core] genirq: Provide " tip-bot for Thomas Gleixner

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=871ugo7rqv.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.