Patchwork [1/4] piix_pci: fix piix3_set_irq_pic()

login
register
mail settings
Submitter Stefan Hajnoczi
Date May 22, 2011, 10:01 p.m.
Message ID <1306101677-26631-2-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/96794/
State New
Headers show

Comments

Stefan Hajnoczi - May 22, 2011, 10:01 p.m.
From: TeLeMan <geleman@gmail.com>

If pic_irq is greater than 7, the irq level is always 0 on 32bits.

Signed-off-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 hw/piix_pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 7f1c4cc..85a320e 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -312,7 +312,7 @@  static void piix3_set_irq_pic(PIIX3State *piix3, int pic_irq)
 {
     qemu_set_irq(piix3->pic[pic_irq],
                  !!(piix3->pic_levels &
-                    (((1UL << PIIX_NUM_PIRQS) - 1) <<
+                    (((1ULL << PIIX_NUM_PIRQS) - 1) <<
                      (pic_irq * PIIX_NUM_PIRQS))));
 }