linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* OMAP1: unnecessary timer interrupt handler code?
@ 2011-05-08 16:28 Russell King - ARM Linux
  2011-05-09  6:03 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-05-08 16:28 UTC (permalink / raw)
  To: linux-omap

MPU timer 2 is used on OMAP1 for the clock source and scheduler clock.
It registers an interrupt, which counts the number of overflows of
this timer.  However, this counter is only referenced by the interrupt
handler.

So, it seems that the following code serves very little purpose.  Can
it be simply deleted?

static unsigned long omap_mpu_timer2_overflows;

static irqreturn_t omap_mpu_timer2_interrupt(int irq, void *dev_id)
{
        omap_mpu_timer2_overflows++;
        return IRQ_HANDLED;
}

static struct irqaction omap_mpu_timer2_irq = {
        .name           = "mpu_timer2",
        .flags          = IRQF_DISABLED,
        .handler        = omap_mpu_timer2_interrupt,
};

...
static void __init omap_init_clocksource(unsigned long rate)
{
...
        setup_irq(INT_TIMER2, &omap_mpu_timer2_irq);
...
}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OMAP1: unnecessary timer interrupt handler code?
  2011-05-08 16:28 OMAP1: unnecessary timer interrupt handler code? Russell King - ARM Linux
@ 2011-05-09  6:03 ` Tony Lindgren
  2011-05-10 12:26   ` Kevin Hilman
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2011-05-09  6:03 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-omap

* Russell King - ARM Linux <linux@arm.linux.org.uk> [110508 19:24]:
> MPU timer 2 is used on OMAP1 for the clock source and scheduler clock.
> It registers an interrupt, which counts the number of overflows of
> this timer.  However, this counter is only referenced by the interrupt
> handler.
> 
> So, it seems that the following code serves very little purpose.  Can
> it be simply deleted?

Seems safe to me. This is probably some left over legacy code
from long time ago.

Regards,

Tony

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OMAP1: unnecessary timer interrupt handler code?
  2011-05-09  6:03 ` Tony Lindgren
@ 2011-05-10 12:26   ` Kevin Hilman
  2011-05-10 18:31     ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2011-05-10 12:26 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: Russell King - ARM Linux, linux-omap

Tony Lindgren <tony@atomide.com> writes:

> * Russell King - ARM Linux <linux@arm.linux.org.uk> [110508 19:24]:
>> MPU timer 2 is used on OMAP1 for the clock source and scheduler clock.
>> It registers an interrupt, which counts the number of overflows of
>> this timer.  However, this counter is only referenced by the interrupt
>> handler.
>> 
>> So, it seems that the following code serves very little purpose.  Can
>> it be simply deleted?
>
> Seems safe to me. This is probably some left over legacy code
> from long time ago.

Yes, I believe this is left over legacy code and can be removed.

Russell, feel free to remove it, or let me know if you want a patch from
me.  If you do it, feel free add

Acked-by: Kevin Hilman <khilman@ti.com>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OMAP1: unnecessary timer interrupt handler code?
  2011-05-10 12:26   ` Kevin Hilman
@ 2011-05-10 18:31     ` Russell King - ARM Linux
  0 siblings, 0 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2011-05-10 18:31 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: Tony Lindgren, linux-omap

On Tue, May 10, 2011 at 02:26:57PM +0200, Kevin Hilman wrote:
> Tony Lindgren <tony@atomide.com> writes:
> 
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [110508 19:24]:
> >> MPU timer 2 is used on OMAP1 for the clock source and scheduler clock.
> >> It registers an interrupt, which counts the number of overflows of
> >> this timer.  However, this counter is only referenced by the interrupt
> >> handler.
> >> 
> >> So, it seems that the following code serves very little purpose.  Can
> >> it be simply deleted?
> >
> > Seems safe to me. This is probably some left over legacy code
> > from long time ago.
> 
> Yes, I believe this is left over legacy code and can be removed.
> 
> Russell, feel free to remove it, or let me know if you want a patch from
> me.  If you do it, feel free add
> 
> Acked-by: Kevin Hilman <khilman@ti.com>

Thanks, added the ack to the patch.  (See the series I posted this morning).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-10 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-08 16:28 OMAP1: unnecessary timer interrupt handler code? Russell King - ARM Linux
2011-05-09  6:03 ` Tony Lindgren
2011-05-10 12:26   ` Kevin Hilman
2011-05-10 18:31     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).