Patchwork [V2] fix acpi regression

login
register
mail settings
Submitter Wen Congyang
Date April 12, 2011, 9:27 a.m.
Message ID <4DA41B10.8030409@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/90756/
State New
Headers show

Comments

Wen Congyang - April 12, 2011, 9:27 a.m.
This bug is introduced by commit 23910d3f.

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

---
 hw/acpi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Isaku Yamahata - April 12, 2011, 9:44 a.m.
Thank you. Looks good.

On Tue, Apr 12, 2011 at 05:27:44PM +0800, Wen Congyang wrote:
> This bug is introduced by commit 23910d3f.
> 
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> 
> ---
>  hw/acpi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/acpi.c b/hw/acpi.c
> index e372474..ad40fb4 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();
>      }
> -- 
> 1.7.1
>
Aurelien Jarno - April 12, 2011, 9:35 p.m.
On Tue, Apr 12, 2011 at 05:27:44PM +0800, Wen Congyang wrote:
> This bug is introduced by commit 23910d3f.
> 
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> 
> ---
>  hw/acpi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied.

> diff --git a/hw/acpi.c b/hw/acpi.c
> index e372474..ad40fb4 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();
>      }
> -- 
> 1.7.1
> 
> 
>

Patch

diff --git a/hw/acpi.c b/hw/acpi.c
index e372474..ad40fb4 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();
     }