All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: David Brownell <david-b@pacbell.net>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>, mingo@redhat.com
Subject: Re: [Bulk] Re: [patch 2.6.18] genirq: remove oops with fasteoi irq_chip descriptors
Date: Thu, 28 Sep 2006 03:18:19 +0200	[thread overview]
Message-ID: <1159406299.9326.644.camel@localhost.localdomain> (raw)
In-Reply-To: <200609271739.10215.david-b@pacbell.net>

Dave,

On Wed, 2006-09-27 at 17:39 -0700, David Brownell wrote:
>  - It wouldn't use chip->mask_ack() when that exists and those
>    other two routines don't, even though mask_ack_irq() is a
>    conveniently defined inline.

So why not replace it by mask_ack_irq() ?

>  - Umm, how could it ever be correct to leave the IRQ active
>    without a dispatcher?  ISTR the rationale for that delayed
>    disable was not purely to be a PITA for all driver writers,
>    but was to address some issue with edge triggering.  In that
>    path, triggering was no longer to be allowed ...

Your patch would result in default_disable() when no shutdown function
is provided. default_disable() does the delayed disable thing, while you
remove the handler. The next event on that line will cause a spurious
IRQ.

>  - Plus ack()ing the IRQ there just seemed pretty dubious.  It's
>    not like there would be anything preventing that signal line
>    from being lowered (or raised, etc) immediately after the ack(),
>    which in some hardware would latch the IRQ until later unmask().
>
> Leaving the question:  what's the point of it??  The overall
> system has to behave sanely with or without the ack(); just
> clearing a latch doesn't mean it couldn't get set later.

Fair enough.

> > > So what's the correct fix then ... use enable() and disable()?
> > > Oopsing isn't OK... 
> > 
> > True, but we can not unconditionally change the semantics. 
> 
> Some current semantics are "it oopses".  That's a good definition
> of semantics that _must_ be changed.  We're not Microsoft.  ;)

Agreed, it just depends on how they get fixed.

> > Does it break existing or new code ?
> 
> Could any code relying on those previous semantics have been
> correct in the first place, though?  Seemed to me it couldn't
> have been.
> 
> Plus, unregistering IRQ dispatchers is a strange notion.  I've
> never seen it done in practice ... normally, they get set up once
> during chip/board setup then never changed.  Bugs in code paths
> like that have been known to last for decades unfixed.

Agreed. Nothing is using this currently.

> > Sorry, I did not think about the defaults in the first place. The
> > conditionals in manage,c are probably superflous leftovers from one of
> > the evolvement.
> 
> And that's how I was taking that particular mask() then ack() too,
> especially given it never used mask_ack() when it should have, and
> since that logic oopsed in various cases with fasteoi handlers.

The remaining question is whether mask_ack_irq() or shutdown() is the
correct approach. Your patch would make it mandatory to implement
shutdown at least for such removable stuff.

I'm not sure about that right now as I'm too tired.

	tglx



  reply	other threads:[~2006-09-28  1:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200609220641.58938.david-b@pacbell.net>
2006-09-22 13:43 ` [patch 2.6.18] genirq: remove oops with fasteoi irq_chip descriptors David Brownell
2006-09-27 21:38   ` Thomas Gleixner
2006-09-27 23:21     ` David Brownell
2006-09-27 23:54       ` Thomas Gleixner
2006-09-28  0:39         ` [Bulk] " David Brownell
2006-09-28  1:18           ` Thomas Gleixner [this message]
2006-09-28  1:40             ` [Bulk] " David Brownell

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=1159406299.9326.644.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.