qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix acpi regression
@ 2011-04-12  5:13 Wen Congyang
  2011-04-12  8:48 ` Isaku Yamahata
  2011-04-12  9:27 ` [Qemu-devel] [PATCH V2] " Wen Congyang
  0 siblings, 2 replies; 8+ messages in thread
From: Wen Congyang @ 2011-04-12  5:13 UTC (permalink / raw)
  To: Isaku Yamahata, Aurelien Jarno, qemu-devel, blauwirbel

This bug is introduced by commit 23910d3f.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>

---
 hw/acpi.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/hw/acpi.c b/hw/acpi.c
index e372474..790bd3b 100644
--- a/hw/acpi.c
+++ b/hw/acpi.c
@@ -355,7 +355,7 @@ static uint8_t *acpi_gpe_ioport_get_ptr(ACPIGPE *gpe, uint32_t addr)
     if (addr < gpe->len / 2) {
         cur = gpe->sts + addr;
     } else if (addr < gpe->len) {
-        cur = gpe->en + addr;
+        cur = gpe->en + addr - gpe->len / 2;
     } else {
         abort();
     }
@@ -369,12 +369,8 @@ void acpi_gpe_ioport_writeb(ACPIGPE *gpe, uint32_t addr, uint32_t val)
 
     addr -= gpe->blk;
     cur = acpi_gpe_ioport_get_ptr(gpe, addr);
-    if (addr < gpe->len / 2) {
-        /* GPE_STS */
-        *cur = (*cur) & ~val;
-    } else if (addr < gpe->len) {
-        /* GPE_EN */
-        *cur = val;
+    if (cur != NULL) {
+        *cur = val & 0xff;
     } else {
         abort();
     }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-13  1:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-12  5:13 [Qemu-devel] [PATCH] fix acpi regression Wen Congyang
2011-04-12  8:48 ` Isaku Yamahata
2011-04-12  9:08   ` Wen Congyang
2011-04-12  9:20     ` Isaku Yamahata
2011-04-12  9:26       ` Wen Congyang
2011-04-12  9:27 ` [Qemu-devel] [PATCH V2] " Wen Congyang
2011-04-12  9:44   ` Isaku Yamahata
2011-04-12 21:35   ` Aurelien Jarno

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