From: Marc Zyngier <marc.zyngier@arm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>,
Christoffer Dall <christoffer.dall@linaro.org>,
Jiang Liu <jiang.liu@linux.intel.com>,
Eric Auger <eric.auger@linaro.org>,
linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] irqchip: GIC: Convert to EOImode == 1
Date: Tue, 25 Aug 2015 18:18:51 +0100 [thread overview]
Message-ID: <55DCA37B.8030208@arm.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1508251745070.15006@nanos>
Hi Thomas,
On 25/08/15 16:46, Thomas Gleixner wrote:
> On Tue, 25 Aug 2015, Marc Zyngier wrote:
>> +static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE;
>> +
>> #ifndef MAX_GIC_NR
>> #define MAX_GIC_NR 1
>> #endif
>> @@ -137,6 +140,14 @@ static inline unsigned int gic_irq(struct irq_data *d)
>> return d->hwirq;
>> }
>>
>> +static inline bool primary_gic_irq(struct irq_data *d)
>> +{
>> + if (MAX_GIC_NR > 1)
>> + return irq_data_get_irq_chip_data(d) == &gic_data[0];
>> +
>> + return true;
>> +}
>> +
>> /*
>> * Routines to acknowledge, disable and enable interrupts
>> */
>> @@ -164,7 +175,14 @@ static void gic_unmask_irq(struct irq_data *d)
>>
>> static void gic_eoi_irq(struct irq_data *d)
>> {
>> - writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
>> + u32 deact_offset = GIC_CPU_EOI;
>> +
>> + if (static_key_true(&supports_deactivate)) {
>> + if (primary_gic_irq(d))
>> + deact_offset = GIC_CPU_DEACTIVATE;
>
> I really wonder for the whole series whether you really want all that
> static key dance and extra conditionals in the callbacks instead of
> just using seperate irq chips for the different interrupts.
Hmmm. We definitely could have different irqchips between primary and
secondary controllers indeed. We'd still need a static key for the
gic_handle_irq path though, but that's not too bad.
Let me hack something, and I'll come back to you ;-).
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2015-08-25 17:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 11:53 [PATCH v3 0/4] irqchip: GICv2/v3: Add support for irq_vcpu_affinity Marc Zyngier
2015-08-25 11:53 ` [PATCH v3 1/4] irqchip: GICv3: Convert to EOImode == 1 Marc Zyngier
2015-08-26 8:54 ` Eric Auger
2015-08-26 10:09 ` Marc Zyngier
2015-08-25 11:53 ` [PATCH v3 2/4] irqchip: GICv3: Don't deactivate interrupts forwarded to a guest Marc Zyngier
2015-08-25 11:53 ` [PATCH v3 3/4] irqchip: GIC: Convert to EOImode == 1 Marc Zyngier
2015-08-25 15:46 ` Thomas Gleixner
2015-08-25 17:18 ` Marc Zyngier [this message]
2015-08-25 11:53 ` [PATCH v3 4/4] irqchip: GIC: Don't deactivate interrupts forwarded to a guest Marc Zyngier
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=55DCA37B.8030208@arm.com \
--to=marc.zyngier@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@linaro.org \
--cc=jason@lakedaemon.net \
--cc=jiang.liu@linux.intel.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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).