Re: [PATCH 3/3] Allow setup_irq call for VPE1 timer.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ralf Baechle
Date: Wednesday, December 1, 2010 - 4:24 am

On Thu, Nov 25, 2010 at 08:37:12PM +0530, Anoop P wrote:



On the stylistic side adding an #ifdef gives me wrinkles.

With CONFIG_MIPS_MT_SMP this patch results in sharing c0_compare_irqaction
between multiple interrupts which is broken.  Struct irqaction contains
the interrupt number, all registered irqaction structs are part of a chained
list via its ->next member and also there is a per interrupt proc directory.

To fix this properly you'll have to introduce do a bit of bookkeeping - you
want to register each interrupt only once - and allocate a struct irqaction
per registered timer interrupt.

The allocation is made a little trickier by kmalloc not being available
yet by the time this code is getting invoked via time_init() so you'll
have to move it to run via the late_time_init hook like x86:

static __init void x86_late_time_init(void)
{
	... do the real work ...
}

/* ... */

void __init time_init(void)
{
        late_time_init = x86_late_time_init;
}

Which makes me wonder if there is a reason why we need to have both
time_init() and late_time_init() - can't we just move the time_init()?

  Ralf
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] Allow setup_irq call for VPE1 timer., Anoop P, (Thu Nov 25, 8:07 am)
Re: [PATCH 3/3] Allow setup_irq call for VPE1 timer., Ralf Baechle, (Wed Dec 1, 4:24 am)