From: Marc Zyngier <marc.zyngier@arm.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>, Noam Camus <noamc@ezchip.com>
Cc: "linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Chris Metcalf <cmetcalf@ezchip.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>
Subject: Re: [PATCH v4 05/19] irqchip: add nps Internal and external irqchips
Date: Tue, 12 Jan 2016 09:28:11 +0000 [thread overview]
Message-ID: <5694C72B.2060702@arm.com> (raw)
In-Reply-To: <C2D7FE5348E1B147BCA15975FBA23075F4E84795@us01wembx1.internal.synopsys.com>
On 12/01/16 09:12, Vineet Gupta wrote:
[...]
>> HANDLE_DOMAIN_IRQ is not mandatory at all - a number of architectures
>> had something open-coded in the past (with some drawbacks and/or bugs),
>> and this config option is just one of the ways to get it right.
>>
>> MIPS/PPC perform the reverse lookup directly, without using this
>> infrastructure, and that would be a valid approach for ARC too.
>
> I'd rather use the generic infrastructure and improve it if needed !
>
>>>> Marc, I hope you are back from holidays. When u get a chance could you please
>>>> respond to above.
>>>>
>>>> Also I tool a stab at it anyways.
>>>> 1. Enabled HANDLE_DOMAIN_IRQ
>>>> 2. arch_do_IRQ() calls handle_domain_irq(NULL, hwirq, regs) since that code
>>>> doesn't know about domains.
>>>>
>>>> It fails w/o irq_set_default_host() being called.
>> Well, that's expected. unless you use the underlying primitive
>> (__handle_domain_irq) and pass false as the parameter for lookup (see
>> handle_IRQ() in arch/arm/kernel/irq.c). This is what we use for "legacy"
>> platforms that do not support domains.
>
> Right I saw that and that causes virq = hwirq - kind of defeats the purpose if we
> were doing this on ARC.
You can forget about this if you convert all your platforms to using
domains. But if you have to deal with a transition period (which, in the
ARM case, will last exactly forever because some platforms will never be
converted to DT), this comes in handy.
>>
>>>> If we go back to sunxi example you quoted above, it relies on driver passing the
>>>> domain to handle_domain_irq(). IMHO it is simpler if we had the default domain.
>>>>
>>>> So long story short, ARC can be made to use handle_domain_irq() w/o the song and
>>>> dance of registering another callback from irqchip code if we retained the default
>>>> domain setting.
>> This only works if you can guarantee that you will never have another
>> irqchip calling irq_set_default_host()... If your system is always
>> simple enough to guarantee that, why not.
>
> ATM we can certainly assume that.
>
> However with ARM approach two irqchips can still call set_handle_irq() and only
> the first one succeeds (and others return silently). That seems wrong to me -
> irq_xxx.c will still use the handler registered by say irq_sun41.c ?
Oh, this is by no mean foolproof. We do rely on irqchips installing
their primary handler only if they are truly the primary irqchip (they
do not have a parent). Anything else will fail badly.
So if you're confident that you can ensure that noone will set de
default domain twice, you'll be fine.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2016-01-12 9:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-16 1:10 [PATCH v4 00/19] Adding plat-eznps to ARC Noam Camus
2015-12-16 1:10 ` [PATCH v4 01/19] Documentation: Add EZchip vendor to binding list Noam Camus
2015-12-16 1:10 ` [PATCH v4 02/19] soc: Support for EZchip SoC Noam Camus
2015-12-16 1:10 ` [PATCH v4 03/19] ARC: [plat-eznps] define IPI_IRQ Noam Camus
2015-12-16 1:10 ` [PATCH v4 04/19] clocksource: Add NPS400 timers driver Noam Camus
2015-12-17 13:12 ` Daniel Lezcano
2015-12-16 1:10 ` [PATCH v4 05/19] irqchip: add nps Internal and external irqchips Noam Camus
2015-12-16 9:30 ` Marc Zyngier
2015-12-18 10:37 ` Noam Camus
2015-12-18 11:21 ` Marc Zyngier
2015-12-18 14:29 ` Noam Camus
2015-12-18 16:31 ` Marc Zyngier
2015-12-19 9:30 ` Noam Camus
2015-12-30 11:35 ` Vineet Gupta
2016-01-12 7:00 ` Vineet Gupta
2016-01-12 8:48 ` Marc Zyngier
2016-01-12 9:12 ` Vineet Gupta
2016-01-12 9:28 ` Marc Zyngier [this message]
2016-01-25 13:08 ` Vineet Gupta
2016-01-29 16:37 ` Noam Camus
2015-12-16 1:10 ` [PATCH v4 06/19] ARC: Set vmalloc size from configuration Noam Camus
2015-12-16 1:10 ` [PATCH v4 07/19] ARC: rwlock: disable interrupts in !LLSC variant Noam Camus
2015-12-16 1:10 ` [PATCH v4 08/19] ARC: rename smp operation init_irq_cpu() to init_per_cpu() Noam Camus
2015-12-16 1:10 ` [PATCH v4 09/19] ARC: Mark secondary cpu online only after all HW setup is done Noam Camus
2015-12-16 1:10 ` [PATCH v4 10/19] ARC: Add clock from device tree to time_init() Noam Camus
2015-12-16 1:10 ` [PATCH v4 11/19] ARC: [plat-eznps] Add eznps board defconfig and dts Noam Camus
2015-12-16 1:10 ` [PATCH v4 12/19] ARC: [plat-eznps] Add eznps platform Noam Camus
2015-12-16 1:10 ` [PATCH v4 13/19] ARC: [plat-eznps] Use dedicated user stack top Noam Camus
2015-12-16 1:10 ` [PATCH v4 14/19] ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg Noam Camus
2015-12-16 1:10 ` [PATCH v4 15/19] ARC: [plat-eznps] Use dedicated SMP barriers Noam Camus
2015-12-16 1:10 ` [PATCH v4 16/19] ARC: [plat-eznps] Use dedicated identity auxiliary register Noam Camus
2015-12-16 1:10 ` [PATCH v4 17/19] ARC: [plat-eznps] Use dedicated cpu_relax() Noam Camus
2015-12-16 1:10 ` [PATCH v4 18/19] ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE Noam Camus
2015-12-16 1:10 ` [PATCH v4 19/19] ARC: Add eznps platform to Kconfig and Makefile Noam Camus
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=5694C72B.2060702@arm.com \
--to=marc.zyngier@arm.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=cmetcalf@ezchip.com \
--cc=daniel.lezcano@linaro.org \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=noamc@ezchip.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).