From: Marc Zyngier <marc.zyngier@arm.com>
To: "Jan Lübbe" <jlu@pengutronix.de>
Cc: Mark Rutland <Mark.Rutland@arm.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
"Joe.C" <srv_yingjoe.chen@mediatek.com>,
"yh.chen@mediatek.com" <yh.chen@mediatek.com>,
Pawel Moll <Pawel.Moll@arm.com>,
"nathan.chung@mediatek.com" <nathan.chung@mediatek.com>"Joe.C"
<yingjoe.chen@mediatek.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Jason Cooper <jason@lakedaemon.net>,
"yingjoe.chen@gmail.com" <yingjoe.chen@gmail.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Rob Herring <robh+dt@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
"eddie.huang@mediatek.com" <eddie.huang@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"srv_heupstream@mediatek.com" <srv_heupstream@mediatek.>
Subject: Re: [RESEND PATCH v2 1/4] irqchip: gic: Change irq type check when extension is present
Date: Wed, 27 Aug 2014 11:36:35 +0100 [thread overview]
Message-ID: <53FDB4B3.6000400@arm.com> (raw)
In-Reply-To: <1409133344.25382.37.camel@coredoba.hi.pengutronix.de>
Hi Jan,
On 27/08/14 10:55, Jan Lübbe wrote:
> Marc,
>
> On Fri, 2014-08-22 at 12:09 +0100, Marc Zyngier wrote:
>> Here, you're using it to program something that sits between the
>> device and the GIC. This is a separate block, with its own hardware
>> configuration, that modifies the interrupt signal. This should be
>> reflected in the device-tree and the code paths.
>>
>> You can probably model this as a separate irqchip for the few
>> interrupts that require this, or have it configured at boot time
>> (assuming the configuration never changes).
>
> It seems to me that using a separate irqchip for a simple inverter would
> add the run-time overhead of passing through wrapper functions on every
> IRQ. Do you have an idea how this could be avoided without using the
> gic_arch_extn feature?
Well, from the rather vague description, it could be slightly more than
a simple inverter, like being able to generate interrupts on both rising
and falling edges. Sorry, but this is not the GIC as ARM has architected it.
Yes, the additional irqchip adds some overhead. But the DT has to
reflect the fact that there is something on the interrupt path that does
some form of conversion.
> As in the DT the actual IRQ polarity should be used, simply configuring
> the HW IRQ polarity in the bootloader is not enough without telling the
> GIC driver which polarity is supported on which IRQ, right?
Looking a bit closer at things, what you describe in DT is the IRQ
polarity the interrupt controller sees. Nothing else should interpret
that field.
So it is legal (IMO) to have a device with an interrupt specifier
describing a rising edge interrupt, and yet have the device generating a
falling edge, with Mediatek's special sauce doing the conversion in between.
Something will have to configure the polarity widget though, but that
can be left outside of the GIC.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2014-08-27 10:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 2:11 [RESEND PATCH v2 0/4] arm: mediatek: Add support for GIC interrupt polarity extension Joe.C
2014-08-13 2:11 ` [RESEND PATCH v2 1/4] irqchip: gic: Change irq type check when extension is present Joe.C
2014-08-22 11:09 ` Marc Zyngier
2014-08-23 5:28 ` Joe.C
2014-08-27 9:55 ` Jan Lübbe
2014-08-27 10:36 ` Marc Zyngier [this message]
2014-08-27 12:23 ` Thomas Gleixner
2014-08-27 13:37 ` Marc Zyngier
2014-08-27 14:03 ` Thomas Gleixner
2014-08-27 14:29 ` Mark Rutland
2014-08-27 15:22 ` Thomas Gleixner
2014-08-13 2:11 ` [RESEND PATCH v2 2/4] arm: mediatek: Add support for GIC interrupt polarity extension Joe.C
2014-08-13 2:11 ` [RESEND PATCH v2 3/4] arm: mediatek: Add intpol in mt6589.dtsi Joe.C
2014-08-13 2:11 ` [RESEND PATCH v2 4/4] dt-bindings: add bindings for mediatek intpol Joe.C
2014-08-21 15:02 ` Matthias Brugger
2014-08-22 8:39 ` Joe.C
2014-08-22 9:23 ` [RESEND PATCH v2 0/4] arm: mediatek: Add support for GIC interrupt polarity extension Joe.C
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=53FDB4B3.6000400@arm.com \
--to=marc.zyngier@arm.com \
--cc=Mark.Rutland@arm.com \
--cc=Pawel.Moll@arm.com \
--cc=arnd@arndb.de \
--cc=jlu@pengutronix.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nathan.chung@mediatek.com \
--cc=srv_yingjoe.chen@mediatek.com \
--cc=yh.chen@mediatek.com \
/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).