From: Ed Blake <ed.blake@sondrel.com>
To: James Hogan <james.hogan@imgtec.com>
Cc: tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] irqchip: imgpdc: Pass on peripheral mask/unmasks to the parent
Date: Thu, 5 Oct 2017 17:42:50 +0100 [thread overview]
Message-ID: <d41d064f-0dd7-0c52-ee21-8242302e612e@sondrel.com> (raw)
In-Reply-To: <b8f33e9b-ebd2-b9cf-a31c-5140a8bf68c5@sondrel.com>
On 05/10/17 16:43, Ed Blake wrote:
> On 05/10/17 16:26, James Hogan wrote:
>> On Thu, Oct 05, 2017 at 03:48:53PM +0100, Ed Blake wrote:
>>> I'm not sure how this is supposed to work, but the issue seems to be
>>> that without this patch the parent irq isn't being masked. This is
>>> causing the parent handler (MIPS GIC in this case) to be called
>>> continuously. This leads to the PDC irq being masked each time, but not
>>> the parent irq. This is the callstack:
>>>
>>> "irq-imgpdc.c"::perip_irq_mask
>>> mask_ack_irq
>>> handle_level_irq
>>> generic_handle_irq_desc
>>> generic_handle_irq
>>> generic_handle_irq_desc
>>> generic_handle_irq
>>> gic_handle_shared_int
>>> gic_handle_local_int
>>> "irq-mips-gic.c"::gic_irq_dispatch
>>> generic_handle_irq_desc
>>> generic_handle_irq
>>> do_IRQ
>>> plat_irq_dispatch()
>> Right, yeh it shouldn't technically be masked by the parent (contrary to
>> what I said above) because its a chained handler, i.e. as far as the
>> kernel knows there could be other IRQs coming through that GIC pin that
>> would also get masked.
>>
>> (though IIRC the perip IRQs can wake, but then they go straight out to
>> separate dedicated IRQ pins into the main IRQ chip, i.e. the GIC in this
>> case).
> That's right, each of the PDC peripherals (RTC, WD, IR) has a dedicated
> IRQ to the parent, and the sys wakes are muxed onto a single IRQ.
>> I think its worth understanding the root cause here though. Disabling
>> routing of an IRQ fundamentally should deassert it. Is it an actual
>> hardware bug that has reached silicon?
> So you think the PDC->parent IRQ must not be being de-asserted when
> IRQ_ROUTE is cleared? I hadn't considered this and thought it was some
> persistence in the GIC due to not being masked / ack'd there. Is that
> possible? I'll discuss the possible IRQ_ROUTE issue with the hardware team.
OK, I've looked at the RTL and discussed it with the hardware team, and
yes it's a bug. Clearing IRQ_ROUTE will not clear a PDC->GIC IRQ once
asserted, the only way is to clear the RTC->PDC IRQ, which we can't do
at this point as interrupts are disabled. So I think this method of
propagating the mask to the parent is a reasonable workaround. Is it ok
if I just modify the commit message and add comments to make it clear
it's a workaround for a h/w bug?
Ed.
next prev parent reply other threads:[~2017-10-05 16:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 9:55 [PATCH 0/4] irqchip: imgpdc: Fix various issues Ed Blake
2017-10-02 9:55 ` [PATCH 1/4] irqchip: imgpdc: Avoid unbalanced irq wake disable Ed Blake
2017-10-02 9:55 ` [PATCH 2/4] irqchip: imgpdc: Avoid immediate wake event during set_wake Ed Blake
2017-10-02 9:55 ` [PATCH 3/4] irqchip: imgpdc: Set sys wake polarities to active high Ed Blake
2017-10-04 13:14 ` James Hogan
2017-10-05 14:37 ` Ed Blake
2017-10-02 9:55 ` [PATCH 4/4] irqchip: imgpdc: Pass on peripheral mask/unmasks to the parent Ed Blake
2017-10-04 14:03 ` James Hogan
2017-10-05 14:48 ` Ed Blake
2017-10-05 15:26 ` James Hogan
2017-10-05 15:43 ` Ed Blake
2017-10-05 16:42 ` Ed Blake [this message]
2017-10-03 20:32 ` [PATCH 0/4] irqchip: imgpdc: Fix various issues 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=d41d064f-0dd7-0c52-ee21-8242302e612e@sondrel.com \
--to=ed.blake@sondrel.com \
--cc=james.hogan@imgtec.com \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.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
all inboxes | Powered by JetHome®