[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48174ba52460d317a630df1389fbb76f5a733250.camel@redhat.com>
Date: Thu, 13 Feb 2020 12:37:40 -0500
From: Mark Salter <msalter@...hat.com>
To: afzal mohammed <afzal.mohd.ma@...il.com>,
linux-c6x-dev@...ux-c6x.org, linux-kernel@...r.kernel.org
Cc: Aurelien Jacquiot <jacquiot.aurelien@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Enrico Weigelt <info@...ux.net>,
Kate Stewart <kstewart@...uxfoundation.org>,
Allison Randal <allison@...utok.net>
Subject: Re: [PATCH 03/18] c6x: replace setup_irq() by request_irq()
On Wed, 2020-02-12 at 13:32 +0530, afzal mohammed wrote:
> request_irq() is preferred over setup_irq(). Existing callers of
> setup_irq() reached mostly via 'init_IRQ()' & 'time_init()', while
> memory allocators are ready by 'mm_init()'.
>
> Per tglx[1], setup_irq() existed in olden days when allocators were not
> ready by the time early interrupts were initialized.
>
> Hence replace setup_irq() by request_irq().
>
> Seldom remove_irq() usage has been observed coupled with setup_irq(),
> wherever that has been found, it too has been replaced by free_irq().
>
> [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
>
> Signed-off-by: afzal mohammed <afzal.mohd.ma@...il.com>
> ---
>
> Since cc'ing cover letter to all maintainers/reviewers would be too
> many, refer for cover letter,
> https://lkml.kernel.org/r/cover.1581478323.git.afzal.mohd.ma@gmail.com
>
> arch/c6x/platforms/timer64.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/arch/c6x/platforms/timer64.c b/arch/c6x/platforms/timer64.c
> index d98d94303498..ceee34c51d4b 100644
> --- a/arch/c6x/platforms/timer64.c
> +++ b/arch/c6x/platforms/timer64.c
> @@ -165,13 +165,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static struct irqaction timer_iact = {
> - .name = "timer",
> - .flags = IRQF_TIMER,
> - .handler = timer_interrupt,
> - .dev_id = &t64_clockevent_device,
> -};
> -
> void __init timer64_init(void)
> {
> struct clock_event_device *cd = &t64_clockevent_device;
> @@ -238,7 +231,9 @@ void __init timer64_init(void)
> cd->cpumask = cpumask_of(smp_processor_id());
>
> clockevents_register_device(cd);
> - setup_irq(cd->irq, &timer_iact);
> + if (request_irq(cd->irq, timer_interrupt, IRQF_TIMER, "timer",
> + &t64_clockevent_device))
> + pr_err("request_irq() on %s failed\n", "timer");
>
> out:
> of_node_put(np);
Acked-by: Mark Salter <msalter@...hat.com>
Powered by blists - more mailing lists