aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorAndrew Bresticker <abrestic@chromium.org>2014-10-20 15:03:56 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:45:14 -0500
commit8f5ee79c92a6b87abea676fd0b94a10953d181f1 (patch)
tree9fbd87f0d5039d11b7132b7f3d0332e3b1a08f91 /drivers/irqchip
parentfb8f7be1299f4b0d86d65e0eada6c9962061c912 (diff)
irqchip: mips-gic: Remove gic_{pending,itrmask}_regs
There's no reason for the pending and masked interrupt bitmasks to be global. Just declare them on the stack in gic_get_int() since they only consume (256*2)/8 = 64 bytes. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Qais Yousef <qais.yousef@imgtec.com> Cc: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8131/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-mips-gic.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index 9d7b1db791e4..5ce11bd7f6a8 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -25,18 +25,8 @@ struct gic_pcpu_mask {
25 DECLARE_BITMAP(pcpu_mask, GIC_MAX_INTRS); 25 DECLARE_BITMAP(pcpu_mask, GIC_MAX_INTRS);
26}; 26};
27 27
28struct gic_pending_regs {
29 DECLARE_BITMAP(pending, GIC_MAX_INTRS);
30};
31
32struct gic_intrmask_regs {
33 DECLARE_BITMAP(intrmask, GIC_MAX_INTRS);
34};
35
36static void __iomem *gic_base; 28static void __iomem *gic_base;
37static struct gic_pcpu_mask pcpu_masks[NR_CPUS]; 29static struct gic_pcpu_mask pcpu_masks[NR_CPUS];
38static struct gic_pending_regs pending_regs[NR_CPUS];
39static struct gic_intrmask_regs intrmask_regs[NR_CPUS];
40static DEFINE_SPINLOCK(gic_lock); 30static DEFINE_SPINLOCK(gic_lock);
41static struct irq_domain *gic_irq_domain; 31static struct irq_domain *gic_irq_domain;
42static int gic_shared_intrs; 32static int gic_shared_intrs;
@@ -242,12 +232,12 @@ int gic_get_c0_perfcount_int(void)
242static unsigned int gic_get_int(void) 232static unsigned int gic_get_int(void)
243{ 233{
244 unsigned int i; 234 unsigned int i;
245 unsigned long *pending, *intrmask, *pcpu_mask; 235 unsigned long *pcpu_mask;
246 unsigned long pending_reg, intrmask_reg; 236 unsigned long pending_reg, intrmask_reg;
237 DECLARE_BITMAP(pending, GIC_MAX_INTRS);
238 DECLARE_BITMAP(intrmask, GIC_MAX_INTRS);
247 239
248 /* Get per-cpu bitmaps */ 240 /* Get per-cpu bitmaps */
249 pending = pending_regs[smp_processor_id()].pending;
250 intrmask = intrmask_regs[smp_processor_id()].intrmask;
251 pcpu_mask = pcpu_masks[smp_processor_id()].pcpu_mask; 241 pcpu_mask = pcpu_masks[smp_processor_id()].pcpu_mask;
252 242
253 pending_reg = GIC_REG(SHARED, GIC_SH_PEND); 243 pending_reg = GIC_REG(SHARED, GIC_SH_PEND);