From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH v6 03/12] acpi: don't pass overflow_time to acpi_pm1_evt_get_sts
Date: Thu, 23 Feb 2012 13:45:17 +0100 [thread overview]
Message-ID: <1330001126-20564-4-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1330001126-20564-1-git-send-email-kraxel@redhat.com>
Pretty pointless, can easily be reached via ACPIREGS now.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 68d5eab..5b16d20 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 c659283..1b083de 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;
--
1.7.1
next prev parent reply other threads:[~2012-02-23 12:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 12:45 [Qemu-devel] [PATCH v6 00/12] initial suspend support Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 01/12] acpi: move around structs Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 02/12] acpi: add ACPIREGS Gerd Hoffmann
2012-02-23 12:45 ` Gerd Hoffmann [this message]
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 04/12] acpi: add acpi_pm1_evt_write_en Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 05/12] suspend: add infrastructure Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 06/12] suspend: switch acpi s3 to new infrastructure Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 07/12] suspend: add system_wakeup monitor command Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 08/12] suspend: make ps/2 devices wakeup the guest Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 09/12] suspend: make serial ports " Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 10/12] suspend: make rtc alarm " Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 11/12] suspend: make acpi timer " Gerd Hoffmann
2012-02-23 12:45 ` [Qemu-devel] [PATCH v6 12/12] suspend: add qmp events Gerd Hoffmann
2012-02-24 19:48 ` [Qemu-devel] [PATCH v6 00/12] initial suspend support Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330001126-20564-4-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).