From patchwork Wed May 22 03:46:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liguang X-Patchwork-Id: 245497 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 14F492C00A7 for ; Wed, 22 May 2013 13:49:50 +1000 (EST) Received: from localhost ([::1]:44896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf03f-0003Ql-QI for incoming@patchwork.ozlabs.org; Tue, 21 May 2013 23:49:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf03C-0003QX-D0 for qemu-devel@nongnu.org; Tue, 21 May 2013 23:49:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uf037-00017y-KW for qemu-devel@nongnu.org; Tue, 21 May 2013 23:49:18 -0400 Received: from [222.73.24.84] (port=11978 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uf037-00010i-9P for qemu-devel@nongnu.org; Tue, 21 May 2013 23:49:13 -0400 X-IronPort-AV: E=Sophos;i="4.87,718,1363104000"; d="scan'208";a="7330107" Received: from unknown (HELO tang.cn.fujitsu.com) ([10.167.250.3]) by song.cn.fujitsu.com with ESMTP; 22 May 2013 11:46:01 +0800 Received: from fnstmail02.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id r4M3mniM015976; Wed, 22 May 2013 11:48:50 +0800 Received: from liguang.fnst.cn.fujitsu.com ([10.167.233.147]) by fnstmail02.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.3) with ESMTP id 2013052211473323-1419843 ; Wed, 22 May 2013 11:47:33 +0800 From: liguang To: qemu-devel@nongnu.org Date: Wed, 22 May 2013 11:46:35 +0800 Message-Id: <1369194397-608-3-git-send-email-lig.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1369194397-608-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1369194397-608-1-git-send-email-lig.fnst@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/05/22 11:47:33, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/05/22 11:47:33, Serialize complete at 2013/05/22 11:47:33 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 222.73.24.84 Cc: Anthony Liguori , Stefan Berger , "Michael S. Tsirkin" , Bruce Rogers , Joel Schopp , Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , liguang , Isaku Yamahata Subject: [Qemu-devel] [PATCH 2/4] acpi/gpe: expand bits of gpe register X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: liguang --- hw/acpi/core.c | 8 ++++---- hw/acpi/ich9.c | 2 +- hw/acpi/piix4.c | 2 +- include/hw/acpi/acpi.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 42eeace..38ddeb8 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -575,9 +575,9 @@ void acpi_gpe_reset(ACPIREGS *ar) memset(ar->gpe.en, 0, ar->gpe.len / 2); } -static uint8_t *acpi_gpe_ioport_get_ptr(ACPIREGS *ar, uint32_t addr) +static uint32_t *acpi_gpe_ioport_get_ptr(ACPIREGS *ar, uint32_t addr) { - uint8_t *cur = NULL; + uint32_t *cur = NULL; if (addr < ar->gpe.len / 2) { cur = ar->gpe.sts + addr; @@ -592,7 +592,7 @@ static uint8_t *acpi_gpe_ioport_get_ptr(ACPIREGS *ar, uint32_t addr) void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val) { - uint8_t *cur; + uint32_t *cur; cur = acpi_gpe_ioport_get_ptr(ar, addr); if (addr < ar->gpe.len / 2) { @@ -608,7 +608,7 @@ void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr, uint32_t val) uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr) { - uint8_t *cur; + uint32_t *cur; uint32_t val; cur = acpi_gpe_ioport_get_ptr(ar, addr); diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 4a17f32..582dbec 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -153,7 +153,7 @@ static int ich9_pm_post_load(void *opaque, int version_id) .info = &vmstate_info_uint8, \ .size = sizeof(uint8_t), \ .flags = VMS_ARRAY | VMS_POINTER, \ - .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ + .offset = vmstate_offset_pointer(_state, _field, uint32_t), \ } const VMStateDescription vmstate_ich9_pm = { diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c index c4af1cc..3a7b669 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c @@ -205,7 +205,7 @@ static int vmstate_acpi_post_load(void *opaque, int version_id) .info = &vmstate_info_uint16, \ .size = sizeof(uint16_t), \ .flags = VMS_SINGLE | VMS_POINTER, \ - .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ + .offset = vmstate_offset_pointer(_state, _field, uint32_t), \ } static const VMStateDescription vmstate_gpe = { diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index 635be7b..deca3ce 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -112,8 +112,8 @@ struct ACPIPM1CNT { struct ACPIGPE { uint8_t len; - uint8_t *sts; - uint8_t *en; + uint32_t *sts; + uint32_t *en; }; struct ACPIREGS {