From 2b75c0f93e395aa6130c20a08016b143e6ec8c53 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Wed, 7 May 2014 15:25:10 +0530 Subject: ARC: [SMP] unify cpu private IRQ requests (TIMER/IPI) The current cpu-private IRQ registration is ugly as it requires need to expose arch_unmask_irq() outside of intc code. So switch to percpu IRQ APIs: -request_percpu_irq [boot core] -enable_percpu_irq [all cores] Encapsulated in helper arc_request_percpu_irq() Signed-off-by: Vineet Gupta --- arch/arc/kernel/time.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'arch/arc/kernel/time.c') diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c index 36c2aa99436..f92cfb14ecd 100644 --- a/arch/arc/kernel/time.c +++ b/arch/arc/kernel/time.c @@ -210,12 +210,6 @@ static irqreturn_t timer_irq_handler(int irq, void *dev_id) return IRQ_HANDLED; } -static struct irqaction arc_timer_irq = { - .name = "Timer0 (clock-evt-dev)", - .flags = IRQF_TIMER | IRQF_PERCPU, - .handler = timer_irq_handler, -}; - /* * Setup the local event timer for @cpu */ @@ -228,15 +222,9 @@ void arc_local_timer_setup() clockevents_config_and_register(evt, arc_get_core_freq(), 0, ARC_TIMER_MAX); - /* - * setup the per-cpu timer IRQ handler - for all cpus - * For non boot CPU explicitly unmask at intc - * setup_irq() -> .. -> irq_startup() already does this on boot-cpu - */ - if (!cpu) - setup_irq(TIMER0_IRQ, &arc_timer_irq); - else - arch_unmask_irq(TIMER0_IRQ); + /* setup the per-cpu timer IRQ handler - for all cpus */ + arc_request_percpu_irq(TIMER0_IRQ, cpu, timer_irq_handler, + "Timer0 (per-cpu-tick)", evt); } /* -- cgit v1.2.3-70-g09d2