mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liu Xiang <liu.xiang6@zte.com.cn>
To: tglx@linutronix.de
Cc: jason@lakedaemon.net, marc.zyngier@arm.com,
	linux-kernel@vger.kernel.org, liuxiang_1999@126.com,
	Liu Xiang <liu.xiang6@zte.com.cn>
Subject: [PATCH] irqchip/gic: fix passing wrong start irq number to irq_alloc_descs() for secondary GICs
Date: Mon, 11 Mar 2019 22:52:08 +0800	[thread overview]
Message-ID: <1552315928-3292-1-git-send-email-liu.xiang6@zte.com.cn> (raw)

For secondary GICs, the start irq number should skip over SGIs
and PPIs. Its value should be 32. So we should pass hwirq_base to 
irq_alloc_descs() rather than a constant number 16.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
---
 drivers/irqchip/irq-gic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index ba2a37a..351f576 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -1157,7 +1157,7 @@ static int gic_init_bases(struct gic_chip_data *gic, int irq_start,
 
 		gic_irqs -= hwirq_base; /* calculate # of irqs to allocate */
 
-		irq_base = irq_alloc_descs(irq_start, 16, gic_irqs,
+		irq_base = irq_alloc_descs(irq_start, hwirq_base, gic_irqs,
 					   numa_node_id());
 		if (irq_base < 0) {
 			WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
-- 
1.9.1


             reply	other threads:[~2019-03-11 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 14:52 Liu Xiang [this message]
2019-03-11 15:55 ` Marc Zyngier
2019-03-12 13:59   ` Liu Xiang

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=1552315928-3292-1-git-send-email-liu.xiang6@zte.com.cn \
    --to=liu.xiang6@zte.com.cn \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuxiang_1999@126.com \
    --cc=marc.zyngier@arm.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

all inboxes | Powered by JetHome®