Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: David Daney <david.daney@cavium.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Marc Zyngier <marc.zyngier@arm.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/5] genirq: Add handle_fasteoi_{level,edge}_irq flow handlers.
Date: Mon, 14 Aug 2017 12:25:01 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1708141221440.1865@nanos> (raw)
In-Reply-To: <1502319099-2782-3-git-send-email-david.daney@cavium.com>

On Wed, 9 Aug 2017, David Daney wrote:
>  #ifdef	CONFIG_IRQ_DOMAIN_HIERARCHY

Can we please make them conditional in order not to bloat all kernels with
it? Like we do for handle_edge_eoi_irq() ?

>  /**
> + *	handle_fasteoi_edge_irq - irq handler for edge hierarchy
> + *	stacked on transparent controllers
> + *
> + *	@desc:	the interrupt description structure for this irq
> + *
> + *	Like handle_fasteoi_irq(), but for use with hierarchy where
> + *	the irq_chip also needs to have its ->irq_ack() function
> + *	called.
> + */
> +void handle_fasteoi_edge_irq(struct irq_desc *desc)
> +{
> +	struct irq_chip *chip = desc->irq_data.chip;
> +
> +	raw_spin_lock(&desc->lock);
> +
> +	if (!irq_may_run(desc))
> +		goto out;
> +
> +	desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
> +
> +	/*
> +	 * If its disabled or no action available
> +	 * then mask it and get out of here:
> +	 */
> +	if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
> +		desc->istate |= IRQS_PENDING;
> +		mask_irq(desc);
> +		goto out;
> +	}
> +
> +	kstat_incr_irqs_this_cpu(desc);
> +	if (desc->istate & IRQS_ONESHOT)
> +		mask_irq(desc);
> +
> +	/* Start handling the irq */
> +	desc->irq_data.chip->irq_ack(&desc->irq_data);
> +
> +	preflow_handler(desc);
> +	handle_irq_event(desc);

Hmm. That's quite different to the way we handle edge interrupts
normally. See handle_edge_irq() and handle_edge_eoi_irq().

Thanks,

	tglx

  reply	other threads:[~2017-08-14 10:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 22:51 [PATCH v7 0/5] genirq/gpio: Add driver for ThunderX and OCTEON-TX SoCs David Daney
2017-08-09 22:51 ` [PATCH v7 1/5] genirq: Export more irq_chip_*_parent() functions David Daney
2017-08-09 22:51 ` [PATCH v7 2/5] genirq: Add handle_fasteoi_{level,edge}_irq flow handlers David Daney
2017-08-14 10:25   ` Thomas Gleixner [this message]
2017-08-16 15:59     ` David Daney
2017-08-16 16:26       ` Thomas Gleixner
2017-08-09 22:51 ` [PATCH v7 3/5] irqdomain: Add irq_domain_{push,pop}_irq() functions David Daney
2017-08-15 13:50   ` Marc Zyngier
2017-08-15 18:00     ` David Daney
2017-08-15 19:02       ` Marc Zyngier
2017-08-09 22:51 ` [PATCH v7 4/5] gpio: Add gpio driver support for ThunderX and OCTEON-TX David Daney
2017-08-09 22:51 ` [PATCH v7 5/5] MAINTAINERS: Add entry for THUNDERX GPIO Driver David Daney

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.20.1708141221440.1865@nanos \
    --to=tglx@linutronix.de \
    --cc=david.daney@cavium.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@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