[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200213002716.99258cfd73002fdd4bbd17d9@gmail.com>
Date: Thu, 13 Feb 2020 00:27:16 +0100
From: Alexander Sverdlin <alexander.sverdlin@...il.com>
To: afzal mohammed <afzal.mohd.ma@...il.com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, Krzysztof Halasa <khalasa@...p.pl>,
Russell King <linux@...linux.org.uk>,
Hartley Sweeten <hsweeten@...ionengravers.com>,
Lubomir Rintel <lkundrak@...sk>,
Kevin Hilman <khilman@...nel.org>,
Aaro Koskinen <aaro.koskinen@....fi>,
Tony Lindgren <tony@...mide.com>,
Viresh Kumar <vireshk@...nel.org>,
Shiraz Hashim <shiraz.linux.kernel@...il.com>,
Jason Cooper <jason@...edaemon.net>,
Andrew Lunn <andrew@...n.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Gregory Clement <gregory.clement@...tlin.com>,
Allison Randal <allison@...utok.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Arnd Bergmann <arnd@...db.de>, Enrico Weigelt <info@...ux.net>
Subject: Re: [PATCH 02/18] ARM: replace setup_irq() by request_irq()
Hi!
On Wed, 12 Feb 2020 13:32:43 +0530
afzal mohammed <afzal.mohd.ma@...il.com> 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>
For the EP93xx part:
Tested-by: Alexander Sverdlin <alexander.sverdlin@...il.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@...il.com>
> diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
> index de998830f534..0335f3b93340 100644
> --- a/arch/arm/mach-ep93xx/timer-ep93xx.c
> +++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
> @@ -117,13 +117,6 @@ static irqreturn_t ep93xx_timer_interrupt(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static struct irqaction ep93xx_timer_irq = {
> - .name = "ep93xx timer",
> - .flags = IRQF_TIMER | IRQF_IRQPOLL,
> - .handler = ep93xx_timer_interrupt,
> - .dev_id = &ep93xx_clockevent,
> -};
> -
> void __init ep93xx_timer_init(void)
> {
> /* Enable and register clocksource and sched_clock on timer 4 */
> @@ -136,7 +129,10 @@ void __init ep93xx_timer_init(void)
> EP93XX_TIMER4_RATE);
>
> /* Set up clockevent on timer 3 */
> - setup_irq(IRQ_EP93XX_TIMER3, &ep93xx_timer_irq);
> + if (request_irq(IRQ_EP93XX_TIMER3, ep93xx_timer_interrupt,
> + IRQF_TIMER | IRQF_IRQPOLL, "ep93xx timer",
> + &ep93xx_clockevent))
> + pr_err("request_irq() on %s failed\n", "ep93xx timer");
> clockevents_config_and_register(&ep93xx_clockevent,
> EP93XX_TIMER123_RATE,
> 1,
--
Alexander Sverdlin.
Powered by blists - more mailing lists