Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Raj Palani <Rajesh_Palani@pmc-sierra.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Question on SMP warning in irq_cpu.c
Date: Mon, 24 Apr 2006 11:08:03 +0100	[thread overview]
Message-ID: <20060424100803.GC3194@linux-mips.org> (raw)
In-Reply-To: <12E9F4D6141E504DA2F115E577252AC7C09451@sjc1exm04.pmc-sierra.bc.ca>

On Tue, Apr 18, 2006 at 10:50:28AM -0700, Raj Palani wrote:

>    I have a question regarding the following warning in the arch/mips/kernel/irq_cpu.c.
>    What is the reason for this comment and in case it is not SMP safe, what are the changes needed to make it SMP safe?
> /*
>  * Almost all MIPS CPUs define 8 interrupt sources.  They are typically
>  * level triggered (i.e., cannot be cleared from CPU; must be cleared from
>  * device).  The first two are software interrupts which we don't really
>  * use or support.  The last one is usually the CPU timer interrupt if
>  * counter register is present or, for CPUs with an external FPU, by
>  * convention it's the FPU exception interrupt.
>  *
>  * Don't even think about using this on SMP.  You have been warned.
>  *
>  * This file exports one global function:
>  *	void mips_cpu_irq_init(int irq_base);
>  */

The interrupt controller is part of the processor itself, so any
manipulation of it's control registers needs to be done on the processor
itself.  On an SMP system however calling enable_irq, disable_irq etc.
is legal on any CPU, so the wrong processor's interrupts might be
changed.  Also there is no provision for interrupts that are handled the
same on all processor.  The count / compare interrupt is a typical
example for this.

The answer is a little more complicated if considering multithreading a la
34K due to the more complicated priviledged resource architecture but the
underlying problem is the same.

  Ralf

      reply	other threads:[~2006-04-24 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-18 17:50 Question on SMP warning in irq_cpu.c Raj Palani
2006-04-24 10:08 ` Ralf Baechle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060424100803.GC3194@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=Rajesh_Palani@pmc-sierra.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox