mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 01:45:18 +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,7 +25,10 @@ static void timer_of_irq_exit(struct of_timer_irq *of_irq)
|
||||||
|
|
||||||
struct clock_event_device *clkevt = &to->clkevt;
|
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 name
|
||||||
* - Get interrupt number by index
|
* - 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
|
* Returns 0 on success, < 0 otherwise
|
||||||
*/
|
*/
|
||||||
static int timer_of_irq_init(struct device_node *np,
|
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;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = request_irq(of_irq->irq, of_irq->handler,
|
ret = of_irq->percpu ?
|
||||||
of_irq->flags ? of_irq->flags : IRQF_TIMER,
|
request_percpu_irq(of_irq->irq, of_irq->handler,
|
||||||
np->full_name, clkevt);
|
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) {
|
if (ret) {
|
||||||
pr_err("Failed to request irq %d for %pOF\n", of_irq->irq, np);
|
pr_err("Failed to request irq %d for %pOF\n", of_irq->irq, np);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
struct of_timer_irq {
|
struct of_timer_irq {
|
||||||
int irq;
|
int irq;
|
||||||
int index;
|
int index;
|
||||||
|
int percpu;
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
irq_handler_t handler;
|
irq_handler_t handler;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user