| To: | Om Narasimhan <onarasimhan@netlogicmicro.com> |
|---|---|
| Subject: | Re: How to chip->startup() with IRQs disabled |
| From: | "Jayachandran C." <jayachandranc@netlogicmicro.com> |
| Date: | Sat, 27 Aug 2011 07:43:11 +0530 |
| Cc: | linux-mips@linux-mips.org |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5pHaPZAzmoukcP8W092MS/qkN2mvHZw3ootSH1hrvT8=; b=q6tAHWfnqL0J670FxeuD1r0ND7x5VHJQH0WVaGaylY+E6tkCg95uGXT6e0ylXuehRX gTk72kLM7wIyusoF6jhl2uiKtlwL2vXRMISF0Ab+eJy27fMC5EMvH7OgfG3jiD7cwZXX BMy/icfl6AuwiUDUEQ6hdTQnEa6rLqmiZ3VaE= |
| In-reply-to: | <74B0AE1BA53C37449DE49BB274F9A2DBC4D052@orion8.netlogicmicro.com> |
| References: | <74B0AE1BA53C37449DE49BB274F9A2DBC4D052@orion8.netlogicmicro.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
On Sat, Aug 27, 2011 at 7:09 AM, Om Narasimhan
<onarasimhan@netlogicmicro.com> wrote:
> Hi,
> I am working on a 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.
In XLR code
(http://git.linux-mips.org/?p=linux.git;a=blob;f=arch/mips/netlogic/xlr/smp.c)
we do the initialization of EIMR in nlm_init_secondary() which is
registered as .init_secondary method in smp_ops. on_each_cpu() may
not be the right way to do this.
JC.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | How to chip->startup() with IRQs disabled, Om Narasimhan |
|---|---|
| Next by Date: | RE: How to chip->startup() with IRQs disabled, Om Narasimhan |
| Previous by Thread: | How to chip->startup() with IRQs disabled, Om Narasimhan |
| Next by Thread: | RE: How to chip->startup() with IRQs disabled, Om Narasimhan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |