[<prev] [next>] [day] [month] [year] [list]
Message-ID: <74B0AE1BA53C37449DE49BB274F9A2DBC4D07C@orion8.netlogicmicro.com>
Date: Thu, 8 Sep 2011 16:13:54 -0700
From: "Om Narasimhan" <onarasimhan@...logicmicro.com>
To: <linux-kernel@...r.kernel.org>
Subject: How to chip->startup() with IRQs disabled
Hi,
I am working on a MIPS chip with multiple cores. I have defined
static struct irq_chip new_plat_chip = {
...
.startup = n_irq_startup,
.mask = n_irq_shutdown,
...
};
In n_irq_startup(), I have to make sure that all cores have set RVEC bit and corresponding EIMR bit. So, I try using on_each_cpu() (because EIMR can be set only by running code on that particular cpu) to run a function to set EIMR.
n_irq_startup() is called as chip->startup() from __setup_irq() (from request_threaded_irq, in turn from request_irq() ) with a spin lock held (desc->lock, in kernel/irq/manage.c). This causes a stack dump from on_each_cpu(). Since it is wrong to call on_each_cpu with interrupts disabled, I want to change this piece of code.
I am wondering how other SMP mips system implement this. Any comments or pointers will be helpful.
I am not in the mailing list, please CC me in replies.
I tried sent this to linux-mips, but no replies. So, trying with a larger audience. (http://www.spinics.net/lists/mips/msg41902.html)
Om.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists