Re: [PATCH] clocksource/drivers/jcore: Use request_percpu_irq()
From: Uros Bizjak
Date: Mon Sep 02 2024 - 06:13:37 EST
On Mon, Sep 2, 2024 at 11:17 AM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
>
> On 30/07/2024 15:20, Uros Bizjak wrote:
> > 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.
> >
> > Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> > Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> > ---
>
> 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.
diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c
index a4a991101fa3..840d09afb947 100644
--- a/drivers/clocksource/jcore-pit.c
+++ b/drivers/clocksource/jcore-pit.c
@@ -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);