xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Thomas Leonard <talex5@gmail.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: Hypervisor crash setting up GIC (arm32)
Date: Wed, 23 Apr 2014 16:35:56 +0100	[thread overview]
Message-ID: <1398267356.18537.169.camel@kazak.uk.xensource.com> (raw)
In-Reply-To: <CAG4opy9piV7R5mGw5ZsFxRtJNpUZOqVQotkA-aK13urw20NYnA@mail.gmail.com>

On Tue, 2014-04-22 at 18:26 +0100, Thomas Leonard wrote:
> On 22 April 2014 15:11, Thomas Leonard <talex5@gmail.com> wrote:
> > Hi guys,
> >
> > I've got a bit further and I'm now trying to get Mini-OS to handle
> > interrupts.  [...] my IRQ handler keeps being called (continuously)
> > with spurious interrupts (interrupt 1023). If anyone knows what might cause that, let me know!
> 
> For reference, the problem here was this code:
> 
>     gic_disable_interrupts(&gic);
>     gic_cpu_set_priority(&gic, 0xff);
>     gic_enable_interrupt(&gic, EVENTS_IRQ /* interrupt number */, 0x1
> /*cpu_set*/, 1 /*level_sensitive*/, 0 /* ppi */);
>     gic_enable_interrupt(&gic, VIRTUALTIMER_IRQ /* interrupt number
> */, 0x1 /*cpu_set*/, 1 /*level_sensitive*/, 1 /* ppi */);
>     gic_enable_interrupts(&gic);
> 
> As soon as EVENTS_IRQ was enabled in gic_enable_interrupt, the IRQ
> handler got called continuously with spurious interrupts and no
> progress could be made.

Stefano, weren't the Galois guys seeing something similar? You fixed it
somewhere in a pending series IIRC? 
> 
> The solution is to call gic_enable_interrupts *before* enabling the
> individual interrupts.
> 
> The patch is on my Mini-OS branch here:
> 
>   https://github.com/talex5/xen/tree/minios-arm-port
> 
> 

  reply	other threads:[~2014-04-23 15:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 14:11 Hypervisor crash setting up GIC (arm32) Thomas Leonard
2014-04-22 14:21 ` karim.allah.ahmed
2014-04-22 14:29   ` Thomas Leonard
2014-04-22 17:26 ` Thomas Leonard
2014-04-23 15:35   ` Ian Campbell [this message]
2014-04-23 17:26     ` Jonathan Daugherty

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=1398267356.18537.169.camel@kazak.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=talex5@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).