mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
Revert "clocksource/drivers/timer-of: Remove percpu irq related code"
This reverts commit7eeb7189c4
which is commit471ef0b5a8
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: I6f186379c389a37362ccf975d88e8cb2f2263c4f Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
18bea82acf
commit
d16ed636ab
|
@ -25,6 +25,9 @@ static void timer_of_irq_exit(struct of_timer_irq *of_irq)
|
|||
|
||||
struct clock_event_device *clkevt = &to->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,7 +69,10 @@ static int timer_of_irq_init(struct device_node *np,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = request_irq(of_irq->irq, of_irq->handler,
|
||||
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) {
|
||||
|
|
|
@ -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