linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: benh@kernel.crashing.org
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, 2 Oct 2007 07:57:17 -0600	[thread overview]
Message-ID: <fa686aa40710020657j1c97a23ejdd3322f5cba3bbb5@mail.gmail.com> (raw)
In-Reply-To: <1191304521.6310.94.camel@pasglop>

On 10/1/07, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> 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...

Yeah, you're right.  Fortunately all current in-tree platforms which
use this do not have shared interrupts, but I'd like to be correct on
this.

I'll tidy this up and send a fixup patch.

Thanks,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

  reply	other threads:[~2007-10-02 13:57 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
2007-10-02 13:57     ` Grant Likely [this message]
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=fa686aa40710020657j1c97a23ejdd3322f5cba3bbb5@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=axboe@kernel.dk \
    --cc=benh@kernel.crashing.org \
    --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).