linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Tehn Yit Chin <tehn.yit.chin@gmail.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: interrupt handlers PowerPC via GCC
Date: Thu, 20 Mar 2008 12:18:24 -0500	[thread overview]
Message-ID: <47E29C60.10300@freescale.com> (raw)
In-Reply-To: <bf04f99c0803191706q7e3a43a3i50a1d479650a3f9d@mail.gmail.com>

Tehn Yit Chin wrote:
> Hi all,
> 
> Apologies for such a basic question. I am trying to write an ISR on a
> MPC551x. When I tried to use the interrupt attribute with
> powerpc-eabi-gcc such as
> 
> _attribute_((interrupt_handler)) foobarISR(void)
> {
> }

Assuming you're talking about an interrupt handler in Linux, you don't 
need to do anything like that.  The actual interrupt entry is assembly 
code.  Search existing drivers for "irqreturn_t" to find examples of 
what an interrupt handler looks like, and "request_irq" for how to hook 
the handler into the interrupt.

-Scott

  reply	other threads:[~2008-03-20 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20  0:06 interrupt handlers PowerPC via GCC Tehn Yit Chin
2008-03-20 17:18 ` Scott Wood [this message]
2008-03-24 23:03   ` Tehn Yit Chin
2008-03-26  2:50     ` David H. Lynch Jr.

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=47E29C60.10300@freescale.com \
    --to=scottwood@freescale.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=tehn.yit.chin@gmail.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;
as well as URLs for NNTP newsgroup(s).