diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2014-10-20 15:03:56 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:14 -0500 |
commit | 8f5ee79c92a6b87abea676fd0b94a10953d181f1 (patch) | |
tree | 9fbd87f0d5039d11b7132b7f3d0332e3b1a08f91 /drivers/irqchip | |
parent | fb8f7be1299f4b0d86d65e0eada6c9962061c912 (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.c | 16 |
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 | ||
28 | struct gic_pending_regs { | ||
29 | DECLARE_BITMAP(pending, GIC_MAX_INTRS); | ||
30 | }; | ||
31 | |||
32 | struct gic_intrmask_regs { | ||
33 | DECLARE_BITMAP(intrmask, GIC_MAX_INTRS); | ||
34 | }; | ||
35 | |||
36 | static void __iomem *gic_base; | 28 | static void __iomem *gic_base; |
37 | static struct gic_pcpu_mask pcpu_masks[NR_CPUS]; | 29 | static struct gic_pcpu_mask pcpu_masks[NR_CPUS]; |
38 | static struct gic_pending_regs pending_regs[NR_CPUS]; | ||
39 | static struct gic_intrmask_regs intrmask_regs[NR_CPUS]; | ||
40 | static DEFINE_SPINLOCK(gic_lock); | 30 | static DEFINE_SPINLOCK(gic_lock); |
41 | static struct irq_domain *gic_irq_domain; | 31 | static struct irq_domain *gic_irq_domain; |
42 | static int gic_shared_intrs; | 32 | static int gic_shared_intrs; |
@@ -242,12 +232,12 @@ int gic_get_c0_perfcount_int(void) | |||
242 | static unsigned int gic_get_int(void) | 232 | static 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); |