qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: qemu-devel@nongnu.org
Cc: christoffer.dall@linaro.org
Subject: [Qemu-devel] [PATCH 2/3] arm_gic: GICD_ICFGR: Write model only for pre v1 GICs
Date: Sat, 16 Aug 2014 21:48:20 +0200	[thread overview]
Message-ID: <1408218501-22326-3-git-send-email-adam@os.inf.tu-dresden.de> (raw)
In-Reply-To: <1408218501-22326-1-git-send-email-adam@os.inf.tu-dresden.de>

Setting the model is only available in pre-v1 GIC models.
---
 hw/intc/arm_gic.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index d2b1aaf..e546647 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -561,10 +561,12 @@ static void gic_dist_writeb(void *opaque, hwaddr offset,
         if (irq < GIC_INTERNAL)
             value |= 0xaa;
         for (i = 0; i < 4; i++) {
-            if (value & (1 << (i * 2))) {
-                GIC_SET_MODEL(irq + i);
-            } else {
-                GIC_CLEAR_MODEL(irq + i);
+            if (s->revision == REV_11MPCORE || s->revision == REV_NVIC) {
+                if (value & (1 << (i * 2))) {
+                    GIC_SET_MODEL(irq + i);
+                } else {
+                    GIC_CLEAR_MODEL(irq + i);
+                }
             }
             if (value & (2 << (i * 2))) {
                 GIC_SET_EDGE_TRIGGER(irq + i);
-- 
2.1.0.rc1

  parent reply	other threads:[~2014-08-16 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16 19:48 [Qemu-devel] [PATCH 0/3] arm_gic: Improve handling of GICD_ICFGR Adam Lackorzynski
2014-08-16 19:48 ` [Qemu-devel] [PATCH 1/3] arm_gic: Fix read " Adam Lackorzynski
2014-08-16 19:48 ` Adam Lackorzynski [this message]
2014-08-18 12:46   ` [Qemu-devel] [PATCH 2/3] arm_gic: GICD_ICFGR: Write model only for pre v1 GICs Christoffer Dall
2014-08-16 19:48 ` [Qemu-devel] [PATCH 3/3] arm_gic: Do not force PPIs to edge-triggered mode Adam Lackorzynski
2014-08-18 12:48   ` Christoffer Dall
2014-08-18 12:52     ` Adam Lackorzynski
2014-08-18 13:01       ` Christoffer Dall

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=1408218501-22326-3-git-send-email-adam@os.inf.tu-dresden.de \
    --to=adam@os.inf.tu-dresden.de \
    --cc=christoffer.dall@linaro.org \
    --cc=qemu-devel@nongnu.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).