request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
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().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <[email protected]>
---
Hi sub-arch maintainers,
If the patch is okay, please take it thr' your tree.
Regards
afzal
v3:
* Split out from series, also split out from ARM patch to subarch level
as Thomas suggested to take it thr' respective maintainers
* Modify string displayed in case of error as suggested by Thomas
* Re-arrange code as required to improve readability
* Remove irrelevant parts from commit message & improve
v2:
* Replace pr_err("request_irq() on %s failed" by
pr_err("%s: request_irq() failed"
* Commit message massage
arch/arm/plat-orion/time.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index ffb93db68e9c..509d4824dc1c 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -177,12 +177,6 @@ static irqreturn_t orion_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static struct irqaction orion_timer_irq = {
- .name = "orion_tick",
- .flags = IRQF_TIMER,
- .handler = orion_timer_interrupt
-};
-
void __init
orion_time_set_base(void __iomem *_timer_base)
{
@@ -236,7 +230,9 @@ orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask,
/*
* Setup clockevent timer (interrupt-driven).
*/
- setup_irq(irq, &orion_timer_irq);
+ if (request_irq(irq, orion_timer_interrupt, IRQF_TIMER, "orion_tick",
+ NULL))
+ pr_err("Failed to request irq %u (orion_tick)\n", irq);
orion_clkevt.cpumask = cpumask_of(0);
clockevents_config_and_register(&orion_clkevt, tclk, 1, 0xfffffffe);
}
--
2.25.1
On Sun, Mar 01, 2020 at 05:53:30PM +0530, afzal mohammed wrote:
> request_irq() is preferred over setup_irq(). Invocations of setup_irq()
> occur after memory allocators are ready.
>
> 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().
>
> [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
>
> Signed-off-by: afzal mohammed <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Andrew
Hi Andrew, Jason, Sebastian, Gregory,
Please let me know the way upstream for this patch
On Sun, Mar 01, 2020 at 04:44:35PM +0100, Andrew Lunn wrote:
> Reviewed-by: Andrew Lunn <[email protected]>
Thanks Andrew
Regards
afzal
Hello afzal mohammed,
> Hi Andrew, Jason, Sebastian, Gregory,
>
> Please let me know the way upstream for this patch
I am taking care of it.
Gregory
>
> On Sun, Mar 01, 2020 at 04:44:35PM +0100, Andrew Lunn wrote:
>
>> Reviewed-by: Andrew Lunn <[email protected]>
>
> Thanks Andrew
>
> Regards
> afzal
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
Hi Olof, Arnd,
This is regarding cleanup of setup_irq() usages & replacing it w/
request_irq(). Earlier it was sent as single series spanning all
architectures & drivers, later Thomas Gleixner suggested [1] to take it
thr' relevant maintainers. As for ARM, there is an additional layer of
sub-architecture maintainers, for ARM, patches were sent to relevant
subsystem maintainers & mailing list, all copied to LAKML as well.
There were 10 sub-arch's in ARM that were subjected to the cleanup,
1. OMAP :https://lkml.kernel.org/r/[email protected]
2. ebsa110 :https://lkml.kernel.org/r/[email protected]
3. rpc :https://lkml.kernel.org/r/[email protected]
4. footbridge :https://lkml.kernel.org/r/[email protected]
5. orion :https://lkml.kernel.org/r/[email protected]
6. ep93xx :https://lkml.kernel.org/r/[email protected]
7. spear :https://lkml.kernel.org/r/[email protected]
8. cns3xxx :https://lkml.kernel.org/r/[email protected]
9. mmp :https://lkml.kernel.org/r/[email protected]
10. iop32x :https://lkml.kernel.org/r/[email protected]
Of this,
(1) OMAP, (2) ebsa110 & (3) rpc are already in linux-next.
(4) footbridge (Russell) - there was a build warning, so he dropped
after applying to his tree, i have submitted the newer fixed version in
his patch system.
(5) orion - Andrew has given Reviewed-by & Gregory mentioned that he will
take care of it.
So if things goes as expected 1 & 5 will be coming to you thr' sub-arch
maintainers, while 2-4 directly via Russell
Now we are left with five (6-10),
(6) ep93xx - Alexander has given Acked-by & mentioned to take thr' Arnd
(7) spear - Viresh has given Acked-by & mentioned to take it thr' Arnd
(8) cns3xxx - Krzysztof has given Acked-by (though not copied to lists,
he has been cc'ed here)
(9) mmp - Lubomir has given Acked-by & Tested-by & mentioned to get it
thr' Olof
(10) iop32xx - per get_mantainer, an orphan
Can you please include the patches 6-10 directly into the armsoc tree ?,
Let me know if anything needs to be done from my side.
Regards
afzal
[1] https://lkml.kernel.org/r/[email protected]
Hi afzal,
> request_irq() is preferred over setup_irq(). Invocations of setup_irq()
> occur after memory allocators are ready.
>
> 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().
>
> [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
>
> Signed-off-by: afzal mohammed <[email protected]>
Applied on mvebu/arm
Thanks,
Gregory
> ---
> Hi sub-arch maintainers,
>
> If the patch is okay, please take it thr' your tree.
>
> Regards
> afzal
>
> v3:
> * Split out from series, also split out from ARM patch to subarch level
> as Thomas suggested to take it thr' respective maintainers
> * Modify string displayed in case of error as suggested by Thomas
> * Re-arrange code as required to improve readability
> * Remove irrelevant parts from commit message & improve
>
> v2:
> * Replace pr_err("request_irq() on %s failed" by
> pr_err("%s: request_irq() failed"
> * Commit message massage
>
> arch/arm/plat-orion/time.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
> index ffb93db68e9c..509d4824dc1c 100644
> --- a/arch/arm/plat-orion/time.c
> +++ b/arch/arm/plat-orion/time.c
> @@ -177,12 +177,6 @@ static irqreturn_t orion_timer_interrupt(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static struct irqaction orion_timer_irq = {
> - .name = "orion_tick",
> - .flags = IRQF_TIMER,
> - .handler = orion_timer_interrupt
> -};
> -
> void __init
> orion_time_set_base(void __iomem *_timer_base)
> {
> @@ -236,7 +230,9 @@ orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask,
> /*
> * Setup clockevent timer (interrupt-driven).
> */
> - setup_irq(irq, &orion_timer_irq);
> + if (request_irq(irq, orion_timer_interrupt, IRQF_TIMER, "orion_tick",
> + NULL))
> + pr_err("Failed to request irq %u (orion_tick)\n", irq);
> orion_clkevt.cpumask = cpumask_of(0);
> clockevents_config_and_register(&orion_clkevt, tclk, 1, 0xfffffffe);
> }
> --
> 2.25.1
>
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com
+ [email protected], [email protected],
in case it helps to reduce the chances of below mail getting slipped
thr' the cracks.
Regards
afzal
On Fri, Mar 13, 2020 at 09:15:20PM +0530, afzal mohammed wrote:
> Hi Olof, Arnd,
>
> This is regarding cleanup of setup_irq() usages & replacing it w/
> request_irq(). Earlier it was sent as single series spanning all
> architectures & drivers, later Thomas Gleixner suggested [1] to take it
> thr' relevant maintainers. As for ARM, there is an additional layer of
> sub-architecture maintainers, for ARM, patches were sent to relevant
> subsystem maintainers & mailing list, all copied to LAKML as well.
>
> There were 10 sub-arch's in ARM that were subjected to the cleanup,
>
> 1. OMAP :https://lkml.kernel.org/r/[email protected]
> 2. ebsa110 :https://lkml.kernel.org/r/[email protected]
> 3. rpc :https://lkml.kernel.org/r/[email protected]
> 4. footbridge :https://lkml.kernel.org/r/[email protected]
> 5. orion :https://lkml.kernel.org/r/[email protected]
> 6. ep93xx :https://lkml.kernel.org/r/[email protected]
> 7. spear :https://lkml.kernel.org/r/[email protected]
> 8. cns3xxx :https://lkml.kernel.org/r/[email protected]
> 9. mmp :https://lkml.kernel.org/r/[email protected]
> 10. iop32x :https://lkml.kernel.org/r/[email protected]
>
> Of this,
>
> (1) OMAP, (2) ebsa110 & (3) rpc are already in linux-next.
>
> (4) footbridge (Russell) - there was a build warning, so he dropped
> after applying to his tree, i have submitted the newer fixed version in
> his patch system.
>
> (5) orion - Andrew has given Reviewed-by & Gregory mentioned that he will
> take care of it.
>
> So if things goes as expected 1 & 5 will be coming to you thr' sub-arch
> maintainers, while 2-4 directly via Russell
>
> Now we are left with five (6-10),
> (6) ep93xx - Alexander has given Acked-by & mentioned to take thr' Arnd
> (7) spear - Viresh has given Acked-by & mentioned to take it thr' Arnd
> (8) cns3xxx - Krzysztof has given Acked-by (though not copied to lists,
> he has been cc'ed here)
> (9) mmp - Lubomir has given Acked-by & Tested-by & mentioned to get it
> thr' Olof
> (10) iop32xx - per get_mantainer, an orphan
>
> Can you please include the patches 6-10 directly into the armsoc tree ?,
> Let me know if anything needs to be done from my side.
>
> Regards
> afzal
>
> [1] https://lkml.kernel.org/r/[email protected]
Hi arm-soc maintainers,
On Tue, Mar 17, 2020 at 10:07:02AM +0530, afzal mohammed wrote:
> + [email protected], [email protected],
> in case it helps to reduce the chances of below mail getting slipped
> thr' the cracks.
> On Fri, Mar 13, 2020 at 09:15:20PM +0530, afzal mohammed wrote:
> > Hi Olof, Arnd,
> >
> > This is regarding cleanup of setup_irq() usages & replacing it w/
> > request_irq(). Earlier it was sent as single series spanning all
> > architectures & drivers, later Thomas Gleixner suggested [1] to take it
> > thr' relevant maintainers. As for ARM, there is an additional layer of
> > sub-architecture maintainers, for ARM, patches were sent to relevant
> > subsystem maintainers & mailing list, all copied to LAKML as well.
:
:
> > Of this,
> > (1) OMAP, (2) ebsa110 & (3) rpc are already in linux-next.
> > (4) footbridge (Russell) - there was a build warning, so he dropped
> > after applying to his tree, i have submitted the newer fixed version in
> > his patch system.
> > (5) orion - Andrew has given Reviewed-by & Gregory mentioned that he will
> > take care of it.
> > So if things goes as expected 1 & 5 will be coming to you thr' sub-arch
> > maintainers, while 2-4 directly via Russell
footbridge & orion went into -next around a week back
> > Now we are left with five (6-10),
> > (6) ep93xx - Alexander has given Acked-by & mentioned to take thr' Arnd
> > (7) spear - Viresh has given Acked-by & mentioned to take it thr' Arnd
> > (8) cns3xxx - Krzysztof has given Acked-by (though not copied to lists,
> > he has been cc'ed here)
> > (9) mmp - Lubomir has given Acked-by & Tested-by & mentioned to get it
> > thr' Olof
> > (10) iop32xx - per get_mantainer, an orphan
> >
> > Can you please include the patches 6-10 directly into the armsoc tree ?,
> > Let me know if anything needs to be done from my side.
Can you please consider for inclusion the above 5 patches.
Sorry for pestering, i understand that none of the ARM SoC pull requests
has been picked up as opposed to what happens normally by this time of
development cycle. Still asking as this is part of tree wide series &
it is safe to send core removal patch of setup_irq() to Thomas only
after all it's usages have been removed.
REgards
afzal
> > [1] https://lkml.kernel.org/r/[email protected]
Hi Arnd,
On Wed, Mar 25, 2020 at 05:13:32PM +0530, afzal mohammed wrote:
> On Tue, Mar 17, 2020 at 10:07:02AM +0530, afzal mohammed wrote:
> > On Fri, Mar 13, 2020 at 09:15:20PM +0530, afzal mohammed wrote:
> > > Can you please include the patches 6-10 directly into the armsoc tree ?,
> > > Let me know if anything needs to be done from my side.
>
> Can you please consider for inclusion the above 5 patches.
>
> Sorry for pestering, i understand that none of the ARM SoC pull requests
> has been picked up as opposed to what happens normally by this time of
> development cycle.
i think you have pulled the ARM SoC pull requests, but above changes
doesn't seem to be applied, can you please respond on how to proceed ?
(of all the tree-wide changes, the above are the only ones in limbo)
Regards
afzal
On Fri, Mar 27, 2020 at 11:46 AM afzal mohammed <[email protected]> wrote:
>
> Hi Arnd,
>
> On Wed, Mar 25, 2020 at 05:13:32PM +0530, afzal mohammed wrote:
> > On Tue, Mar 17, 2020 at 10:07:02AM +0530, afzal mohammed wrote:
> > > On Fri, Mar 13, 2020 at 09:15:20PM +0530, afzal mohammed wrote:
>
> > > > Can you please include the patches 6-10 directly into the armsoc tree ?,
> > > > Let me know if anything needs to be done from my side.
> >
> > Can you please consider for inclusion the above 5 patches.
> >
> > Sorry for pestering, i understand that none of the ARM SoC pull requests
> > has been picked up as opposed to what happens normally by this time of
> > development cycle.
>
> i think you have pulled the ARM SoC pull requests, but above changes
> doesn't seem to be applied, can you please respond on how to proceed ?
> (of all the tree-wide changes, the above are the only ones in limbo)
Hi afzal,
To make sure I get the right ones, could you bounce all the patches that are
still missing to [email protected] to let them show up in patchwork?
I'll apply them right away after that. Sorry I forgot about them as I went
through the patchwork backlog.
Arnd
Hi Arnd,
On Fri, Mar 27, 2020 at 11:55:36AM +0100, Arnd Bergmann wrote:
> To make sure I get the right ones, could you bounce all the patches that are
> still missing to [email protected] to let them show up in patchwork?
Done.
If it helps, i can send the same patches w/ tags received as well.
Regards
afzal
Hi Arnd,
On Fri, Mar 27, 2020 at 04:40:12PM +0530, afzal mohammed wrote:
> On Fri, Mar 27, 2020 at 11:55:36AM +0100, Arnd Bergmann wrote:
> > To make sure I get the right ones, could you bounce all the patches that are
> > still missing to [email protected] to let them show up in patchwork?
>
> Done.
Sorry, i first forwarded, after that i bounced all, but not able to
see the bounced ones in patchwork, only the forwarded ones.
> If it helps, i can send the same patches w/ tags received as well.
Let me know if if anything more needs to be done from my side.
Regards
afzal
On Fri, Mar 27, 2020 at 12:29 PM afzal mohammed <[email protected]> wrote:
>
> Hi Arnd,
>
> On Fri, Mar 27, 2020 at 04:40:12PM +0530, afzal mohammed wrote:
> > On Fri, Mar 27, 2020 at 11:55:36AM +0100, Arnd Bergmann wrote:
>
> > > To make sure I get the right ones, could you bounce all the patches that are
> > > still missing to [email protected] to let them show up in patchwork?
> >
> > Done.
>
> Sorry, i first forwarded, after that i bounced all, but not able to
> see the bounced ones in patchwork, only the forwarded ones.
Right, I see the same thing. Unfortunately, the version I have now
doesn't work easily in git-am.
> > If it helps, i can send the same patches w/ tags received as well.
>
> Let me know if if anything more needs to be done from my side.
I can probably fix it up here, but it would help if you can resend the
remaining patches using git-send-email with all the tags added in
and the normal subject lines.
Arnd
request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
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().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <[email protected]>
Acked-by: Alexander Sverdlin <[email protected]>
---
v4:
* Add received tags
v3:
* Split out from series, also create subarch level patch as Thomas
suggested to take it thr' respective maintainers
* Modify string displayed in case of error as suggested by Thomas
* Re-arrange code as required to improve readability
* Remove irrelevant parts from commit message & improve
v2:
* Replace pr_err("request_irq() on %s failed" by
pr_err("%s: request_irq() failed"
* Commit message massage
arch/arm/mach-ep93xx/timer-ep93xx.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-ep93xx/timer-ep93xx.c b/arch/arm/mach-ep93xx/timer-ep93xx.c
index de998830f534..dd4b164d1831 100644
--- a/arch/arm/mach-ep93xx/timer-ep93xx.c
+++ b/arch/arm/mach-ep93xx/timer-ep93xx.c
@@ -117,15 +117,11 @@ 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)
{
+ int irq = IRQ_EP93XX_TIMER3;
+ unsigned long flags = IRQF_TIMER | IRQF_IRQPOLL;
+
/* Enable and register clocksource and sched_clock on timer 4 */
writel(EP93XX_TIMER4_VALUE_HIGH_ENABLE,
EP93XX_TIMER4_VALUE_HIGH);
@@ -136,7 +132,9 @@ 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_timer_interrupt, flags, "ep93xx timer",
+ &ep93xx_clockevent))
+ pr_err("Failed to request irq %d (ep93xx timer)\n", irq);
clockevents_config_and_register(&ep93xx_clockevent,
EP93XX_TIMER123_RATE,
1,
--
2.25.1
request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
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().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
---
v4:
* Add received tags
v3:
* Split out from series, also split out from ARM patch to subarch level
as Thomas suggested to take it thr' respective maintainers
* Modify string displayed in case of error as suggested by Thomas
* Re-arrange code as required to improve readability
* Remove irrelevant parts from commit message & improve
v2:
* Replace pr_err("request_irq() on %s failed" by
pr_err("%s: request_irq() failed"
* Commit message massage
arch/arm/mach-spear/time.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-spear/time.c b/arch/arm/mach-spear/time.c
index 289e036c9c30..d1fdb6066f7b 100644
--- a/arch/arm/mach-spear/time.c
+++ b/arch/arm/mach-spear/time.c
@@ -181,12 +181,6 @@ static irqreturn_t spear_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static struct irqaction spear_timer_irq = {
- .name = "timer",
- .flags = IRQF_TIMER,
- .handler = spear_timer_interrupt
-};
-
static void __init spear_clockevent_init(int irq)
{
u32 tick_rate;
@@ -201,7 +195,8 @@ static void __init spear_clockevent_init(int irq)
clockevents_config_and_register(&clkevt, tick_rate, 3, 0xfff0);
- setup_irq(irq, &spear_timer_irq);
+ if (request_irq(irq, spear_timer_interrupt, IRQF_TIMER, "timer", NULL))
+ pr_err("Failed to request irq %d (timer)\n", irq);
}
static const struct of_device_id timer_of_match[] __initconst = {
--
2.25.1
request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
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().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <[email protected]>
Acked-by: Krzysztof Halasa <[email protected]>
---
v4:
* Add received tags
v3:
* Split out from series, also split out from ARM patch to subarch level
as Thomas suggested to take it thr' respective maintainers
* Modify string displayed in case of error as suggested by Thomas
* Re-arrange code as required to improve readability
* Remove irrelevant parts from commit message & improve
v2:
* Replace pr_err("request_irq() on %s failed" by
pr_err("%s: request_irq() failed"
* Commit message massage
arch/arm/mach-cns3xxx/core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 1d61a7701c11..e4f4b20b83a2 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -189,12 +189,6 @@ static irqreturn_t cns3xxx_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static struct irqaction cns3xxx_timer_irq = {
- .name = "timer",
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
- .handler = cns3xxx_timer_interrupt,
-};
-
/*
* Set up the clock source and clock events devices
*/
@@ -245,7 +239,9 @@ static void __init __cns3xxx_timer_init(unsigned int timer_irq)
writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET);
/* Make irqs happen for the system timer */
- setup_irq(timer_irq, &cns3xxx_timer_irq);
+ if (request_irq(timer_irq, cns3xxx_timer_interrupt,
+ IRQF_TIMER | IRQF_IRQPOLL, "timer", NULL))
+ pr_err("Failed to request irq %d (timer)\n", timer_irq);
cns3xxx_clockevents_init(timer_irq);
}
--
2.25.1
request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
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().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <[email protected]>
---
v4:
* No change
v3:
* Split out from series, also split out from ARM patch to subarch level
as Thomas suggested to take it thr' respective maintainers
* Modify string displayed in case of error as suggested by Thomas
* Re-arrange code as required to improve readability
* Remove irrelevant parts from commit message & improve
v2:
* Replace pr_err("request_irq() on %s failed" by
pr_err("%s: request_irq() failed"
* Commit message massage
arch/arm/mach-iop32x/time.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-iop32x/time.c b/arch/arm/mach-iop32x/time.c
index 18a4df5c1baa..ae533b66fefd 100644
--- a/arch/arm/mach-iop32x/time.c
+++ b/arch/arm/mach-iop32x/time.c
@@ -137,13 +137,6 @@ iop_timer_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
-static struct irqaction iop_timer_irq = {
- .name = "IOP Timer Tick",
- .handler = iop_timer_interrupt,
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
- .dev_id = &iop_clockevent,
-};
-
static unsigned long iop_tick_rate;
unsigned long get_iop_tick_rate(void)
{
@@ -154,6 +147,7 @@ EXPORT_SYMBOL(get_iop_tick_rate);
void __init iop_init_time(unsigned long tick_rate)
{
u32 timer_ctl;
+ int irq = IRQ_IOP32X_TIMER0;
sched_clock_register(iop_read_sched_clock, 32, tick_rate);
@@ -168,7 +162,9 @@ void __init iop_init_time(unsigned long tick_rate)
*/
write_tmr0(timer_ctl & ~IOP_TMR_EN);
write_tisr(1);
- setup_irq(IRQ_IOP32X_TIMER0, &iop_timer_irq);
+ if (request_irq(irq, iop_timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
+ "IOP Timer Tick", &iop_clockevent))
+ pr_err("Failed to request irq() %d (IOP Timer Tick)\n", irq);
iop_clockevent.cpumask = cpumask_of(0);
clockevents_config_and_register(&iop_clockevent, tick_rate,
0xf, 0xfffffffe);
--
2.25.1
request_irq() is preferred over setup_irq(). Invocations of setup_irq()
occur after memory allocators are ready.
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().
[1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos
Signed-off-by: afzal mohammed <[email protected]>
Acked-by: Lubomir Rintel <[email protected]>
Tested-by: Lubomir Rintel <[email protected]>
---
v4:
* Add received tags
v3:
* Split out from series, also split out from ARM patch to subarch level
as Thomas suggested to take it thr' respective maintainers
* Modify string displayed in case of error as suggested by Thomas
* Re-arrange code as required to improve readability
* Remove irrelevant parts from commit message & improve
v2:
* Replace pr_err("request_irq() on %s failed" by
pr_err("%s: request_irq() failed"
* Commit message massage
arch/arm/mach-mmp/time.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index c65cfc1ad99b..049a65f47b42 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -175,13 +175,6 @@ static void __init timer_config(void)
__raw_writel(0x2, mmp_timer_base + TMR_CER);
}
-static struct irqaction timer_irq = {
- .name = "timer",
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
- .handler = timer_interrupt,
- .dev_id = &ckevt,
-};
-
void __init mmp_timer_init(int irq, unsigned long rate)
{
timer_config();
@@ -190,7 +183,9 @@ void __init mmp_timer_init(int irq, unsigned long rate)
ckevt.cpumask = cpumask_of(0);
- setup_irq(irq, &timer_irq);
+ if (request_irq(irq, timer_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
+ "timer", &ckevt))
+ pr_err("Failed to request irq %d (timer)\n", irq);
clocksource_register_hz(&cksrc, rate);
clockevents_config_and_register(&ckevt, rate, MIN_DELTA, MAX_DELTA);
--
2.25.1
Hi,
On Fri, Mar 27, 2020 at 12:58:57PM +0100, Arnd Bergmann wrote:
> I can probably fix it up here, but it would help if you can resend the
> remaining patches using git-send-email with all the tags added in
> and the normal subject lines.
i have sent the remaining patches using git send-email w/ all the tags
collected and with normal subject lines, as a reply to your mail. They
look okay in patchwork, let me know in case of any problems.
Regards
afzal