linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: axboe@kernel.dk, linuxppc-dev@ozlabs.org, paulus@samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/6] Sysace: Move IRQ handler registration to occur after FSM is initialized
Date: Tue, 02 Oct 2007 15:55:21 +1000	[thread overview]
Message-ID: <1191304521.6310.94.camel@pasglop> (raw)
In-Reply-To: <20070930225726.2476.44211.stgit@trillian.cg.shawcable.net>


On Sun, 2007-09-30 at 16:57 -0600, Grant Likely wrote:
>         val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
>         ace_out(ace, ACE_CTRL, val);
>  
> +       /* Now we can hook up the irq handler */
> +       if (ace->irq != NO_IRQ) {
> +               rc = request_irq(ace->irq, ace_interrupt, 0,
> "systemace", ace);
> +               if (rc) {
> +                       /* Failure - fall back to polled mode */
> +                       dev_err(ace->dev, "request_irq failed\n");
> +                       ace->irq = NO_IRQ;
> +               }
> +       }
> +

I don't know the HW but from the above, it looks like you enable
interrupt emission on the HW before you register the handler, which is
wrong. You should make sure on the contrary that IRQs on the HW are
disabled until after you have registered a handler.

Only really a problem if you have shared interrupts but still...

Ben.

  reply	other threads:[~2007-10-02  5:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 22:56 [PATCH v2 0/6] SystemACE: rework and of_platform bus binding patches Grant Likely
2007-09-30 22:57 ` [PATCH v2 1/6] Add Xilinx SystemACE entry to maintainers Grant Likely
2007-09-30 22:57 ` [PATCH v2 2/6] Sysace: Use the established platform bus api Grant Likely
2007-09-30 23:05   ` Christoph Hellwig
2007-09-30 23:33     ` Grant Likely
2007-10-01 11:59       ` Jens Axboe
2007-10-01 13:17         ` Grant Likely
2007-10-02  5:58         ` Benjamin Herrenschmidt
2007-10-02  6:35           ` Jens Axboe
2007-10-02 13:52             ` Grant Likely
2007-09-30 22:57 ` [PATCH v2 3/6] Sysace: Move structure allocation from bus binding into common code Grant Likely
2007-09-30 22:57 ` [PATCH v2 4/6] Sysace: minor rework and cleanup changes Grant Likely
2007-09-30 22:57 ` [PATCH v2 5/6] Sysace: Move IRQ handler registration to occur after FSM is initialized Grant Likely
2007-10-02  5:55   ` Benjamin Herrenschmidt [this message]
2007-10-02 13:57     ` Grant Likely
2007-09-30 22:57 ` [PATCH v2 6/6] Sysace: Add of_platform_bus binding Grant Likely

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=1191304521.6310.94.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=axboe@kernel.dk \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).