From patchwork Wed Feb 15 10:28:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hoffmann, Gerd" X-Patchwork-Id: 141294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9BC6A1007D4 for ; Wed, 15 Feb 2012 21:29:00 +1100 (EST) Received: from localhost ([::1]:53722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxc6Z-0007GK-TJ for incoming@patchwork.ozlabs.org; Wed, 15 Feb 2012 05:28:55 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxc6C-0006si-5x for qemu-devel@nongnu.org; Wed, 15 Feb 2012 05:28:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rxc66-0000f5-4T for qemu-devel@nongnu.org; Wed, 15 Feb 2012 05:28:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rxc65-0000eh-Tx for qemu-devel@nongnu.org; Wed, 15 Feb 2012 05:28:26 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1FASOJY001390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 15 Feb 2012 05:28:24 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1FASM7E016537; Wed, 15 Feb 2012 05:28:23 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id CDCB64144F; Wed, 15 Feb 2012 11:28:21 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 15 Feb 2012 11:28:12 +0100 Message-Id: <1329301701-30395-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1329301701-30395-1-git-send-email-kraxel@redhat.com> References: <1329301701-30395-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v5 03/12] acpi: don't pass overflow_time to acpi_pm1_evt_get_sts 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 Pretty pointless, can easily be reached via ACPIREGS now. Signed-off-by: Gerd Hoffmann --- hw/acpi.c | 6 +++--- hw/acpi.h | 2 +- hw/acpi_piix4.c | 4 ++-- hw/vt82c686.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index 1922e53..1129335 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -249,10 +249,10 @@ int acpi_table_add(const char *t) } /* ACPI PM1a EVT */ -uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar, int64_t overflow_time) +uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar) { int64_t d = acpi_pm_tmr_get_clock(); - if (d >= overflow_time) { + if (d >= ar->tmr.overflow_time) { ar->pm1.evt.sts |= ACPI_BITMASK_TIMER_STATUS; } return ar->pm1.evt.sts; @@ -260,7 +260,7 @@ uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar, int64_t overflow_time) void acpi_pm1_evt_write_sts(ACPIREGS *ar, uint16_t val) { - uint16_t pm1_sts = acpi_pm1_evt_get_sts(ar, ar->tmr.overflow_time); + uint16_t pm1_sts = acpi_pm1_evt_get_sts(ar); if (pm1_sts & val & ACPI_BITMASK_TIMER_STATUS) { /* if TMRSTS is reset, then compute the new overflow time */ acpi_pm_tmr_calc_overflow_time(ar); diff --git a/hw/acpi.h b/hw/acpi.h index 530c86a..e1d5e3b 100644 --- a/hw/acpi.h +++ b/hw/acpi.h @@ -131,7 +131,7 @@ static inline int64_t acpi_pm_tmr_get_clock(void) } /* PM1a_EVT: piix and ich9 don't implement PM1b. */ -uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar, int64_t overflow_time); +uint16_t acpi_pm1_evt_get_sts(ACPIREGS *ar); void acpi_pm1_evt_write_sts(ACPIREGS *ar, uint16_t val); void acpi_pm1_evt_power_down(ACPIREGS *ar); void acpi_pm1_evt_reset(ACPIREGS *ar); diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index afb37e2..b6899f4 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -80,7 +80,7 @@ static void pm_update_sci(PIIX4PMState *s) { int sci_level, pmsts; - pmsts = acpi_pm1_evt_get_sts(&s->ar, s->ar.tmr.overflow_time); + pmsts = acpi_pm1_evt_get_sts(&s->ar); sci_level = (((pmsts & s->ar.pm1.evt.en) & (ACPI_BITMASK_RT_CLOCK_ENABLE | ACPI_BITMASK_POWER_BUTTON_ENABLE | @@ -138,7 +138,7 @@ static void pm_ioport_read(IORange *ioport, uint64_t addr, unsigned width, switch(addr) { case 0x00: - val = acpi_pm1_evt_get_sts(&s->ar, s->ar.tmr.overflow_time); + val = acpi_pm1_evt_get_sts(&s->ar); break; case 0x02: val = s->ar.pm1.evt.en; diff --git a/hw/vt82c686.c b/hw/vt82c686.c index 8370434..10e066b 100644 --- a/hw/vt82c686.c +++ b/hw/vt82c686.c @@ -177,7 +177,7 @@ static void pm_update_sci(VT686PMState *s) { int sci_level, pmsts; - pmsts = acpi_pm1_evt_get_sts(&s->ar, s->ar.tmr.overflow_time); + pmsts = acpi_pm1_evt_get_sts(&s->ar); sci_level = (((pmsts & s->ar.pm1.evt.en) & (ACPI_BITMASK_RT_CLOCK_ENABLE | ACPI_BITMASK_POWER_BUTTON_ENABLE | @@ -226,7 +226,7 @@ static uint32_t pm_ioport_readw(void *opaque, uint32_t addr) addr &= 0x0f; switch (addr) { case 0x00: - val = acpi_pm1_evt_get_sts(&s->ar, s->ar.tmr.overflow_time); + val = acpi_pm1_evt_get_sts(&s->ar); break; case 0x02: val = s->ar.pm1.evt.en;