Commit ac61d143 authored by Russell King's avatar Russell King

ARM: GIC: move enablement of PPI interrupts to gic.c

Avoid adding nasty genirq-specific code to local timers to enable PPI
interrupts.  Instead, provide a gic function to do this.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7627dc80
...@@ -331,6 +331,16 @@ void __cpuinit gic_secondary_init(unsigned int gic_nr) ...@@ -331,6 +331,16 @@ void __cpuinit gic_secondary_init(unsigned int gic_nr)
gic_cpu_init(&gic_data[gic_nr]); gic_cpu_init(&gic_data[gic_nr]);
} }
void __cpuinit gic_enable_ppi(unsigned int irq)
{
unsigned long flags;
local_irq_save(flags);
irq_to_desc(irq)->status |= IRQ_NOPROBE;
gic_unmask_irq(irq);
local_irq_restore(flags);
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
{ {
......
...@@ -39,6 +39,7 @@ void gic_init(unsigned int, unsigned int, void __iomem *, void __iomem *); ...@@ -39,6 +39,7 @@ void gic_init(unsigned int, unsigned int, void __iomem *, void __iomem *);
void gic_secondary_init(unsigned int); void gic_secondary_init(unsigned int);
void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
void gic_raise_softirq(const struct cpumask *mask, unsigned int irq); void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
void gic_enable_ppi(unsigned int);
#endif #endif
#endif #endif
...@@ -127,8 +127,6 @@ static void __cpuinit twd_calibrate_rate(void) ...@@ -127,8 +127,6 @@ static void __cpuinit twd_calibrate_rate(void)
*/ */
void __cpuinit twd_timer_setup(struct clock_event_device *clk) void __cpuinit twd_timer_setup(struct clock_event_device *clk)
{ {
unsigned long flags;
twd_calibrate_rate(); twd_calibrate_rate();
clk->name = "local_timer"; clk->name = "local_timer";
...@@ -143,10 +141,7 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) ...@@ -143,10 +141,7 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
clk->min_delta_ns = clockevent_delta2ns(0xf, clk); clk->min_delta_ns = clockevent_delta2ns(0xf, clk);
/* Make sure our local interrupt controller has this enabled */ /* Make sure our local interrupt controller has this enabled */
local_irq_save(flags); gic_enable_ppi(clk->irq);
irq_to_desc(clk->irq)->status |= IRQ_NOPROBE;
get_irq_chip(clk->irq)->unmask(clk->irq);
local_irq_restore(flags);
clockevents_register_device(clk); clockevents_register_device(clk);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment