Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Yoann Allain <yallain@avilinks.com>
Cc: "'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: Re: Preempted interrupt handler
Date: Tue, 20 Dec 2005 14:18:29 +0100	[thread overview]
Message-ID: <20051220131829.GB3376@linux-mips.org> (raw)
In-Reply-To: <43A6F155.7080402@avilinks.com>

On Mon, Dec 19, 2005 at 06:43:49PM +0100, Yoann Allain wrote:

> I'm actually working on a driver for a Marvell chip on a MIPS-based 
> board running a 2.4 kernel. I have one problem:
> In my module, my interrupt handler is never executed. I have traced the 
> code until action->handler(irq, action->dev_id, regs)  in 
> handle_IRQ_event() but when the handler should be executed, it is not 
> and the kernel reenters in the low-level interrupt dispatch routine 
> (because we're using level sensitive interrupts and it is still up). 
> I've checked that the function pointer called is the one of my handler 
> but my routine is never entered.
> 
> But when my handler is included in the kernel (ie not compiled as a 
> module), it works! My function gets executed and acks the interrupt. In 
> this case all goes fine.
>
> Moreover, I've noticed that the kernel symbols are mapped at adresses 
> like 0x80258040 (start_kernel) but my module (and so is my handler) is 
> loaded at something like 0xc000275c . I was thinking the module would be 
> loaded in the same memory area as the kernel, so I think this is weird...
> Perhaps, the module handler can't be executed because of its location 
> but I don't know how to fix this.

Good new then - you don't need to fix anything :-)

The sympthoms you're describing are not specific enough, so only some
general advice:

 - Make sure you're running a current version of modutils; older versions
   have a number of bugs that could result in almost any kind of ill
   behaviour.
 - Make sure all object files of the modules have been built with
   -mlong-calls.  That's done automatically by the kernel's makefiles
   but not necessarily when building out of tree and certain versions
   would silently tolerate the resulting relocation error.

  Ralf

  reply	other threads:[~2005-12-20 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-19 17:43 Preempted interrupt handler Yoann Allain
2005-12-20 13:18 ` Ralf Baechle [this message]
2005-12-21 19:39   ` Srinivas Kommu
2005-12-21 20:15     ` Steven J. Hill
2005-12-22  0:46     ` Fuxin Zhang
2005-12-22  8:35       ` Yoann Allain

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=20051220131829.GB3376@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=yallain@avilinks.com \
    /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