mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Marc Zyngier <marc.zyngier@arm.com>
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 17:46:44 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1508251745070.15006@nanos> (raw)
In-Reply-To: <1440503605-10185-4-git-send-email-marc.zyngier@arm.com>

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.

Thanks,

	tglx

  reply	other threads:[~2015-08-25 15:47 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 [this message]
2015-08-25 17:18     ` Marc Zyngier
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=alpine.DEB.2.11.1508251745070.15006@nanos \
    --to=tglx@linutronix.de \
    --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=marc.zyngier@arm.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

all inboxes | Powered by JetHome®