diff options
author | Andrew Bresticker <abrestic@chromium.org> | 2014-10-20 15:04:03 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:15 -0500 |
commit | f7ea3060b60a8f32794aa094f9216b198083d232 (patch) | |
tree | c7f0edef222b826183891c1bbc3f0cc6399766e5 | |
parent | 001f5fe72cf6434f00fccf2b628f6843de1c3d4f (diff) |
clocksource: mips-gic: Use percpu_dev_id
Since the GIC timer IRQ is a percpu IRQ, we can use percpu_dev_id
to pass the IRQ handler the correct clock_event_device.
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/8138/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | drivers/clocksource/mips-gic-timer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index 763aa1c9130f..05bdfe1e3e03 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c | |||
@@ -39,17 +39,16 @@ static void gic_set_clock_mode(enum clock_event_mode mode, | |||
39 | 39 | ||
40 | static irqreturn_t gic_compare_interrupt(int irq, void *dev_id) | 40 | static irqreturn_t gic_compare_interrupt(int irq, void *dev_id) |
41 | { | 41 | { |
42 | struct clock_event_device *cd; | 42 | struct clock_event_device *cd = dev_id; |
43 | int cpu = smp_processor_id(); | ||
44 | 43 | ||
45 | gic_write_compare(gic_read_compare()); | 44 | gic_write_compare(gic_read_compare()); |
46 | cd = &per_cpu(gic_clockevent_device, cpu); | ||
47 | cd->event_handler(cd); | 45 | cd->event_handler(cd); |
48 | return IRQ_HANDLED; | 46 | return IRQ_HANDLED; |
49 | } | 47 | } |
50 | 48 | ||
51 | struct irqaction gic_compare_irqaction = { | 49 | struct irqaction gic_compare_irqaction = { |
52 | .handler = gic_compare_interrupt, | 50 | .handler = gic_compare_interrupt, |
51 | .percpu_dev_id = &gic_clockevent_device, | ||
53 | .flags = IRQF_PERCPU | IRQF_TIMER, | 52 | .flags = IRQF_PERCPU | IRQF_TIMER, |
54 | .name = "timer", | 53 | .name = "timer", |
55 | }; | 54 | }; |