xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [RFC] Spurious PIC interrupts
Date: Tue, 28 Aug 2012 22:32:13 +0100	[thread overview]
Message-ID: <CC62F76D.3D210%keir.xen@gmail.com> (raw)
In-Reply-To: <503D2339.1020705@citrix.com>

On 28/08/2012 20:59, "Andrew Cooper" <andrew.cooper3@citrix.com> wrote:

> Since Jan's patch to print and mask bogus PIC vectors, we have found
> some issues on older hardware were supurious PIC vectors are being
> repeatedly logged, as spurious vectors will ignore the relevant mask bit.
> 
> The log message is deceptive in the case of a spurious vector.  I have
> attached an RFC patch which changes the bogus_8259A_irq logic to be able
> to detect spurious vectors and be rather less verbose about them.
> 
> The new bogus_8259A_irq() function is basically a copy of
> _mask_and_ack_8259A_irq(), but returning a boolean indicating whether it
> was a genuine interrupt or not, which controls whether the "No irq
> handler" message in do_IRQ gets printed or not.
> 
> Jan: are you happy with the style of the adjustment, or could you
> suggest a better way of doing it?

No, you should make the change to _mask_and_ack_8259A_irq() itself, and
callers which do not care about the return code can simply discard it.

I hardly even want one instance of that appalling function in the tree, let
alone two! Terrible abuse of goto, and I'm pretty laid back about goto use.

And we don't use True/False anywhere else in Xen. We don't even have any
centralised definition of true/false of any kind, so you should really just
use 1/0 directly. Alternatively you could propose a patch to define
true/false in our types.h, and use those. I don't know where the capitalised
True/False came from!

 -- Keir

  reply	other threads:[~2012-08-28 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 19:59 [RFC] Spurious PIC interrupts Andrew Cooper
2012-08-28 21:32 ` Keir Fraser [this message]
2012-08-29  9:08   ` Andrew Cooper
2012-08-29  9:50     ` Keir Fraser

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=CC62F76D.3D210%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xen.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).