clocksource/drivers/jcore: Use request_percpu_irq()
PATCH 1/1 clocksource/drivers/jcore: Use request_percpu_irq()
Use request_percpu_irq() instead of request_irq() to solve the following sparse warning:
jcore-pit.c:173:40: warning: incorrect type in argument 5 (different address spaces)
jcore-pit.c:173:40: expected void *dev
jcore-pit.c:173:40: got struct jcore_pit [noderef] __percpu *static [assigned] [toplevel] jcore_pit_percpu
Compile tested only.
--- drivers/clocksource/jcore-pit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clocksource/jcore-pit.c +2 -3
@@ -168,9 +168,8 @@ static int __init jcore_pit_init(struct device_node *node)return -ENOMEM ; } - err =request_irq (pit_irq, jcore_timer_interrupt, -IRQF_TIMER |IRQF_PERCPU , -"jcore_pit" , jcore_pit_percpu); + err =request_percpu_irq (pit_irq, jcore_timer_interrupt, +"jcore_pit" , jcore_pit_percpu);if (err) {pr_err ("pit irq request failed: %d\n" , err);free_percpu (jcore_pit_percpu);
Signature · 1 line
2.45.2
Daniel Lezcano
AppliedQuoted 7 lines · Uros Bizjak
Use
request_percpu_irq()instead ofrequest_irq()to solve the following sparse warning:jcore-pit.c:173:40: warning: incorrect type in argument 5 (different address spaces)
jcore-pit.c:173:40: expected void *dev
jcore-pit.c:173:40: got structjcore_pit[noderef]__percpu*static [assigned] [toplevel]jcore_pit_percpu
Quoted 6 lines
Compile tested only.
Signed-off-by Uros Bizjak <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>---
Added Rich Felker in Cc
Applied, thanks
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Quoted 11 lines · Daniel Lezcano
Quoted 9 lines · Uros Bizjak
Use
request_percpu_irq()instead ofrequest_irq()to solve the following sparse warning:jcore-pit.c:173:40: warning: incorrect type in argument 5 (different address spaces)
jcore-pit.c:173:40: expected void *dev
jcore-pit.c:173:40: got structjcore_pit[noderef]__percpu*static [assigned] [toplevel]jcore_pit_percpuCompile tested only.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Uros Bizjak <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>---
Added Rich Felker in Cc
Applied, thanks
I think we also need the following patch, since we changed request_irq to request_percpu_irq:
Uros.
drivers/clocksource/jcore-pit.c +1 -1
@@ -120,7 +120,7 @@ static int jcore_pit_local_init(unsigned cpu)static irqreturn_t jcore_timer_interrupt (int irq,void *dev_id) { -struct jcore_pit *pit =this_cpu_ptr (dev_id); +struct jcore_pit *pit = dev_id;if (clockevent_state_oneshot (&pit->ced))jcore_pit_disable (pit);
Quoted 18 lines · Uros Bizjak
Quoted 16 lines · Daniel Lezcano
Quoted 13 lines · Uros Bizjak
Use
request_percpu_irq()instead ofrequest_irq()to solve the following sparse warning:jcore-pit.c:173:40: warning: incorrect type in argument 5 (different address spaces)
jcore-pit.c:173:40: expected void *dev
jcore-pit.c:173:40: got structjcore_pit[noderef]__percpu*static [assigned] [toplevel]jcore_pit_percpuCompile tested only.
Signed-off-by Uros Bizjak <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>---
Quoted 6 lines
Quoted 3 lines
Added Rich Felker in Cc
Applied, thanks
I think we also need the following patch, since we changed
request_irqtorequest_percpu_irq:
Hmm, I think you are right:
I would say it is:
static irqreturn_t jcore_timer_interrupt(int irq, void *dev_id)
{
struct jcore_pit *pit = dev_id;
OR
struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu);
[ ... ]
}The former the better for the encapsulation.
Do you mind to update the patch ?
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Quoted 42 lines · Daniel Lezcano
Quoted 18 lines · Uros Bizjak
Quoted 16 lines · Daniel Lezcano
Quoted 13 lines · Uros Bizjak
Use
request_percpu_irq()instead ofrequest_irq()to solve the following sparse warning:jcore-pit.c:173:40: warning: incorrect type in argument 5 (different address spaces)
jcore-pit.c:173:40: expected void *dev
jcore-pit.c:173:40: got structjcore_pit[noderef]__percpu*static [assigned] [toplevel]jcore_pit_percpuCompile tested only.
Signed-off-by Uros Bizjak <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>---
Quoted 6 lines
Quoted 3 lines
Added Rich Felker in Cc
Applied, thanks
I think we also need the following patch, since we changed
request_irqtorequest_percpu_irq:Hmm, I think you are right:
I would say it is:
static
irqreturn_tjcore_timer_interrupt(int irq, void *dev_id){ struct jcore_pit *pit = dev_id; OR struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu); [ ... ] }
Quoted 3 lines
The former the better for the encapsulation.
Do you mind to update the patch ?
Done, v2 with changed jcore_timer_interrupt() was just sent.
Sorry for the inconvenience.
Thanks,
Uros.
Quoted 44 lines · Uros Bizjak
Quoted 42 lines · Daniel Lezcano
Quoted 18 lines · Uros Bizjak
Quoted 16 lines · Daniel Lezcano
Quoted 13 lines · Uros Bizjak
Use
request_percpu_irq()instead ofrequest_irq()to solve the following sparse warning:jcore-pit.c:173:40: warning: incorrect type in argument 5 (different address spaces)
jcore-pit.c:173:40: expected void *dev
jcore-pit.c:173:40: got structjcore_pit[noderef]__percpu*static [assigned] [toplevel]jcore_pit_percpuCompile tested only.
Signed-off-by Uros Bizjak <[email protected]>Cc Daniel Lezcano <[email protected]>Cc Thomas Gleixner <[email protected]>---
Quoted 6 lines
Quoted 3 lines
Added Rich Felker in Cc
Applied, thanks
I think we also need the following patch, since we changed
request_irqtorequest_percpu_irq:Hmm, I think you are right:
I would say it is:
static
irqreturn_tjcore_timer_interrupt(int irq, void *dev_id){ struct jcore_pit *pit = dev_id; OR struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu); [ ... ] }
Quoted 7 lines
Quoted 3 lines
The former the better for the encapsulation.
Do you mind to update the patch ?
Done, v2 with changed
jcore_timer_interrupt()was just sent.Sorry for the inconvenience.
No worries, thanks for the v2
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog