[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-2a07870511829977d02609dac6450017b0419ea9@git.kernel.org>
Date: Thu, 25 Feb 2016 02:04:36 -0800
From: tip-bot for Qais Yousef <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, hpa@...or.com, linux-mips@...ux-mips.org,
jason@...edaemon.net, ralf@...ux-mips.org,
jiang.liu@...ux.intel.com, marc.zyngier@....com,
qsyousef@...il.com, lisa.parratt@...tec.com, mingo@...nel.org,
linux-kernel@...r.kernel.org, qais.yousef@...tec.com
Subject: [tip:irq/core] irqchip/mips-gic: Use gic_vpes instead of NR_CPUS
Commit-ID: 2a07870511829977d02609dac6450017b0419ea9
Gitweb: http://git.kernel.org/tip/2a07870511829977d02609dac6450017b0419ea9
Author: Qais Yousef <qais.yousef@...tec.com>
AuthorDate: Tue, 8 Dec 2015 13:20:25 +0000
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 25 Feb 2016 10:56:58 +0100
irqchip/mips-gic: Use gic_vpes instead of NR_CPUS
NR_CPUS is set by Kconfig and could be much higher than what actually is in the
system.
gic_vpes should be a true representitives of the number of cpus in the system,
so use it instead.
Signed-off-by: Qais Yousef <qais.yousef@...tec.com>
Acked-by: Ralf Baechle <ralf@...ux-mips.org>
Cc: <jason@...edaemon.net>
Cc: <marc.zyngier@....com>
Cc: <jiang.liu@...ux.intel.com>
Cc: <linux-mips@...ux-mips.org>
Cc: <lisa.parratt@...tec.com>
Cc: Qais Yousef <qsyousef@...il.com>
Link: http://lkml.kernel.org/r/1449580830-23652-15-git-send-email-qais.yousef@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
drivers/irqchip/irq-mips-gic.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 794fc59..1fe73a1 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -465,7 +465,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
gic_map_to_vpe(irq, mips_cm_vp_id(cpumask_first(&tmp)));
/* Update the pcpu_masks */
- for (i = 0; i < NR_CPUS; i++)
+ for (i = 0; i < gic_vpes; i++)
clear_bit(irq, pcpu_masks[i].pcpu_mask);
set_bit(irq, pcpu_masks[cpumask_first(&tmp)].pcpu_mask);
@@ -1098,8 +1098,8 @@ static void __init __gic_init(unsigned long gic_base_addr,
gic_ipi_domain->bus_token = DOMAIN_BUS_IPI;
- /* Make the last 2 * NR_CPUS available for IPIs */
- bitmap_set(ipi_resrv, gic_shared_intrs - 2 * NR_CPUS, 2 * NR_CPUS);
+ /* Make the last 2 * gic_vpes available for IPIs */
+ bitmap_set(ipi_resrv, gic_shared_intrs - 2 * gic_vpes, 2 * gic_vpes);
gic_basic_init();
Powered by blists - more mailing lists