mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Paul Cercueil <paul@crapouillou.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>
Cc: linux-kernel@vger.kernel.org, od@zcrc.me,
	Zhou Yanjie <zhouyanjie@zoho.com>
Subject: Re: [PATCH 3/4] irqchip: ingenic: Get virq number from IRQ domain
Date: Mon, 29 Jul 2019 11:38:43 +0100	[thread overview]
Message-ID: <538e79e5-539b-3066-b662-8ed4ec8bf261@arm.com> (raw)
In-Reply-To: <20190727191741.30317-3-paul@crapouillou.net>

[+ Zhou Yanjie]

Paul,

On 27/07/2019 20:17, Paul Cercueil wrote:
> Get the virq number from the IRQ domain instead of calculating it from
> the hardcoded irq base.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
>  drivers/irqchip/irq-ingenic.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c
> index d97a3a500249..82a079fa3a3d 100644
> --- a/drivers/irqchip/irq-ingenic.c
> +++ b/drivers/irqchip/irq-ingenic.c
> @@ -21,6 +21,7 @@
>  
>  struct ingenic_intc_data {
>  	void __iomem *base;
> +	struct irq_domain *domain;
>  	unsigned num_chips;
>  };
>  
> @@ -34,6 +35,7 @@ struct ingenic_intc_data {
>  static irqreturn_t intc_cascade(int irq, void *data)
>  {
>  	struct ingenic_intc_data *intc = irq_get_handler_data(irq);
> +	struct irq_domain *domain = intc->domain;
>  	uint32_t irq_reg;
>  	unsigned i;
>  
> @@ -43,7 +45,8 @@ static irqreturn_t intc_cascade(int irq, void *data)
>  		if (!irq_reg)
>  			continue;
>  
> -		generic_handle_irq(__fls(irq_reg) + (i * 32) + JZ4740_IRQ_BASE);
> +		irq = irq_find_mapping(domain, __fls(irq_reg) + (i * 32));
> +		generic_handle_irq(irq);
>  	}
>  
>  	return IRQ_HANDLED;
> @@ -95,6 +98,8 @@ static int __init ingenic_intc_of_init(struct device_node *node,
>  		goto out_unmap_base;
>  	}
>  
> +	intc->domain = domain;
> +
>  	for (i = 0; i < num_chips; i++) {
>  		/* Mask all irqs */
>  		writel(0xffffffff, intc->base + (i * CHIP_SIZE) +
> 

This is likely to conflict with this[1] series, which turns the
intc_cascade function into a chained handler (which it should have been
from the start). Can you please work with Zhou to post a unified series?

Having two people working independently on the same file is likely to
end badly otherwise.

Thanks,

	M.

[1]
https://lore.kernel.org/lkml/1564335273-22931-1-git-send-email-zhouyanjie@zoho.com/
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2019-07-29 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-27 19:17 [PATCH 1/4] irqchip: ingenic: Drop redundant irq_suspend / irq_resume functions Paul Cercueil
2019-07-27 19:17 ` [PATCH 2/4] irqchip: ingenic: Error out if IRQ domain creation failed Paul Cercueil
2019-07-27 19:17 ` [PATCH 3/4] irqchip: ingenic: Get virq number from IRQ domain Paul Cercueil
2019-07-29 10:38   ` Marc Zyngier [this message]
2019-07-29 16:57     ` Paul Cercueil
2019-07-30  6:01       ` Zhou Yanjie
2019-07-27 19:17 ` [PATCH 4/4] irqchip: ingenic: Alloc generic chips " Paul Cercueil

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=538e79e5-539b-3066-b662-8ed4ec8bf261@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=od@zcrc.me \
    --cc=paul@crapouillou.net \
    --cc=tglx@linutronix.de \
    --cc=zhouyanjie@zoho.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

Powered by JetHome