Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: arrow zhang <arrow.ebd@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: [Help] R3000 CPU porting, Oops while run app
Date: Tue, 17 Aug 2010 13:42:46 +0100	[thread overview]
Message-ID: <20100817124246.GA14155@linux-mips.org> (raw)
In-Reply-To: <AANLkTikW2_NNj52goVm-h9yvHZb3e-TktmOY5jDHPpRe@mail.gmail.com>

On Tue, Aug 17, 2010 at 11:49:27AM +0800, arrow zhang wrote:

> yeah, I have known some reason on it:
> * not call "mips_cpu_irq_init" in function "arch_init_irq"
> * and did not use "set_irq_chip_and_handler"
> * before I only setup the "chip" with code "irq_desc[i].chip =
> &irq_type;", but it is for old kernel(2.6.19)
> 
> so new code is:
> void __init arch_init_irq(void)
> {
> 	int i;
> 
> 	mips_cpu_irq_init();
> 	for (i = 0; i < 32; ++i) {
> 		set_irq_chip_and_handler(i, &irq_type, handle_level_irq);
> 	}
> }

Most systems define MIPS_CPU_IRQ_BASE as 0 so be careful that your
set_irq_chip_and_handler loop doesn't overwrite any previous setup by
mips_cpu_irq_init.  If your interrupt controller has 32 interrupts you
probably want to assign interrupts 0..7 to the CPU interrupts and 8..39
to the other controller.

  Ralf

  reply	other threads:[~2010-08-17 12:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17  0:28 [Help] R3000 CPU porting, Oops while run app arrow zhang
2010-08-17  3:49 ` arrow zhang
2010-08-17 12:42   ` Ralf Baechle [this message]
2010-08-19 15:14     ` arrow zhang
  -- strict thread matches above, loose matches on Subject: below --
2010-08-16 15:44 arrow zhang

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=20100817124246.GA14155@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=arrow.ebd@gmail.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