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

On 28/08/12 22:32, Keir Fraser wrote:
> 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.

Ok - I initially avoided that because _mask_and_ack_8259A_irq() is used
to fill a function pointer structure, and preferred less change to the core.

I will re-design somewhat with these points in mind.

~Andrew

>
> 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
>
>

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

  reply	other threads:[~2012-08-29  9:08 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
2012-08-29  9:08   ` Andrew Cooper [this message]
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=503DDC13.30206@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=keir.xen@gmail.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).