Revert "clocksource/drivers/timer-of: Remove percpu irq related code"
This reverts commit 302ac43e58
which is
commit 471ef0b5a8aaca4296108e756b970acfc499ede4 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: Ia9f22b51d4153ed7ffc4cf3f846df73e6f146511
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
97009b56c6
commit
8ed9415215
@ -25,7 +25,10 @@ static void timer_of_irq_exit(struct of_timer_irq *of_irq)
|
||||
|
||||
struct clock_event_device *clkevt = &to->clkevt;
|
||||
|
||||
free_irq(of_irq->irq, clkevt);
|
||||
if (of_irq->percpu)
|
||||
free_percpu_irq(of_irq->irq, clkevt);
|
||||
else
|
||||
free_irq(of_irq->irq, clkevt);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -39,6 +42,9 @@ static void timer_of_irq_exit(struct of_timer_irq *of_irq)
|
||||
* - Get interrupt number by name
|
||||
* - Get interrupt number by index
|
||||
*
|
||||
* When the interrupt is per CPU, 'request_percpu_irq()' is called,
|
||||
* otherwise 'request_irq()' is used.
|
||||
*
|
||||
* Returns 0 on success, < 0 otherwise
|
||||
*/
|
||||
static int timer_of_irq_init(struct device_node *np,
|
||||
@ -63,9 +69,12 @@ static int timer_of_irq_init(struct device_node *np,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = request_irq(of_irq->irq, of_irq->handler,
|
||||
of_irq->flags ? of_irq->flags : IRQF_TIMER,
|
||||
np->full_name, clkevt);
|
||||
ret = of_irq->percpu ?
|
||||
request_percpu_irq(of_irq->irq, of_irq->handler,
|
||||
np->full_name, clkevt) :
|
||||
request_irq(of_irq->irq, of_irq->handler,
|
||||
of_irq->flags ? of_irq->flags : IRQF_TIMER,
|
||||
np->full_name, clkevt);
|
||||
if (ret) {
|
||||
pr_err("Failed to request irq %d for %pOF\n", of_irq->irq, np);
|
||||
return ret;
|
||||
|
@ -11,6 +11,7 @@
|
||||
struct of_timer_irq {
|
||||
int irq;
|
||||
int index;
|
||||
int percpu;
|
||||
const char *name;
|
||||
unsigned long flags;
|
||||
irq_handler_t handler;
|
||||
|
Loading…
Reference in New Issue
Block a user