[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 03/11] acpi: don't pass overflow_time to acpi_pm1
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH v4 03/11] acpi: don't pass overflow_time to acpi_pm1_evt_get_sts |
Date: |
Thu, 9 Feb 2012 18:05:35 +0100 |
Pretty pointless, can be reached via ACPIREGS now.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
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;
--
1.7.1
- [Qemu-devel] [PATCH v4 00/11] initial suspend support, Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 03/11] acpi: don't pass overflow_time to acpi_pm1_evt_get_sts,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH v4 02/11] acpi: add ACPIREGS, Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 07/11] suspend: add system_wakeup monitor command, Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 04/11] acpi: add acpi_pm1_evt_write_en, Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 01/11] acpi: move around structs, Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 09/11] suspend: make serial ports wakeup the guest., Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 10/11] suspend: make rtc alarm wakeup the guest., Gerd Hoffmann, 2012/02/09
- [Qemu-devel] [PATCH v4 05/11] suspend: add infrastructure, Gerd Hoffmann, 2012/02/09