From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Leon Alrae <leon.alrae@imgtec.com>,
Amit Shah <amit.shah@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PULL 25/28] hw/acpi: acpi_pm1_cnt_init(): take "disable_s3" and "disable_s4"
Date: Thu, 4 Jun 2015 13:11:29 +0200 [thread overview]
Message-ID: <1433416111-19022-26-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1433416111-19022-1-git-send-email-mst@redhat.com>
From: Laszlo Ersek <lersek@redhat.com>
This patch only modifies the function prototype and updates all chipset
code that calls acpi_pm1_cnt_init() to pass in their own disable_s3 and
disable_s4 settings. vt82c686 is assumed to be fixed "S3 and S4 enabled".
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1204696
Cc: Amit Shah <amit.shah@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
include/hw/acpi/acpi.h | 3 ++-
hw/acpi/core.c | 3 ++-
hw/acpi/ich9.c | 3 ++-
hw/acpi/piix4.c | 2 +-
hw/isa/vt82c686.c | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index 9390997..b20bd55 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -167,7 +167,8 @@ void acpi_pm1_evt_init(ACPIREGS *ar, acpi_update_sci_fn update_sci,
MemoryRegion *parent);
/* PM1a_CNT: piix and ich9 don't implement PM1b CNT. */
-void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent, uint8_t s4_val);
+void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent,
+ bool disable_s3, bool disable_s4, uint8_t s4_val);
void acpi_pm1_cnt_update(ACPIREGS *ar,
bool sci_enable, bool sci_disable);
void acpi_pm1_cnt_reset(ACPIREGS *ar);
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index 8623993..c165096 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -592,7 +592,8 @@ static const MemoryRegionOps acpi_pm_cnt_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
-void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent, uint8_t s4_val)
+void acpi_pm1_cnt_init(ACPIREGS *ar, MemoryRegion *parent,
+ bool disable_s3, bool disable_s4, uint8_t s4_val)
{
ar->pm1.cnt.s4_val = s4_val;
ar->wakeup.notify = acpi_notify_wakeup;
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 84e5bb8..799351e 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -219,7 +219,8 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
acpi_pm_tmr_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io);
acpi_pm1_evt_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io);
- acpi_pm1_cnt_init(&pm->acpi_regs, &pm->io, pm->s4_val);
+ acpi_pm1_cnt_init(&pm->acpi_regs, &pm->io, pm->disable_s3, pm->disable_s4,
+ pm->s4_val);
acpi_gpe_init(&pm->acpi_regs, ICH9_PMIO_GPE0_LEN);
memory_region_init_io(&pm->io_gpe, OBJECT(lpc_pci), &ich9_gpe_ops, pm,
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 1b28481..01b304a 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -475,7 +475,7 @@ static void piix4_pm_realize(PCIDevice *dev, Error **errp)
acpi_pm_tmr_init(&s->ar, pm_tmr_timer, &s->io);
acpi_pm1_evt_init(&s->ar, pm_tmr_timer, &s->io);
- acpi_pm1_cnt_init(&s->ar, &s->io, s->s4_val);
+ acpi_pm1_cnt_init(&s->ar, &s->io, s->disable_s3, s->disable_s4, s->s4_val);
acpi_gpe_init(&s->ar, GPE_LEN);
s->powerdown_notifier.notify = piix4_pm_powerdown_req;
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index b8197b1..b2ba870 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -356,7 +356,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp)
acpi_pm_tmr_init(&s->ar, pm_tmr_timer, &s->io);
acpi_pm1_evt_init(&s->ar, pm_tmr_timer, &s->io);
- acpi_pm1_cnt_init(&s->ar, &s->io, 2);
+ acpi_pm1_cnt_init(&s->ar, &s->io, false, false, 2);
}
I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
--
MST
next prev parent reply other threads:[~2015-06-04 11:11 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 11:10 [Qemu-devel] [PULL 00/28] pc, acpi, virtio, tpm Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 01/28] acpi: add missing ssdt Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 02/28] hw/q35: fix floppy controller definition in ich9 Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 03/28] virtio-pci: don't try to mask or unmask vqs without notifiers Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 04/28] TPM: fix build with tpm disabled Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 05/28] virtio: 64bit features fixups Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 06/28] acpi: add acpi_send_gpe_event() to rise sci for hotplug Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 07/28] acpi: add implementation of aml_while() term Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 08/28] hw/pci: made pci_bus_is_root a PCIBusClass method Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 09/28] hw/pci: made pci_bus_num " Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 10/28] hw/i386: query only for q35/pc when looking for pci host bridge Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 11/28] hw/pci: extend PCI config access to support devices behind PXB Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 12/28] hw/acpi: add support for i440fx 'snooping' root busses Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 13/28] hw/apci: add _PRT method for extra PCI " Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 14/28] hw/acpi: add _CRS method for extra " Michael S. Tsirkin
2015-06-04 11:10 ` [Qemu-devel] [PULL 15/28] hw/acpi: remove from root bus 0 the crs resources used by other buses Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 16/28] hw/pci: removed 'rootbus nr is 0' assumption from qmp_pci_query Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 17/28] hw/pci: introduce PCI Expander Bridge (PXB) Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 18/28] hw/pci: inform bios if the system has extra pci root buses Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 19/28] hw/pxb: add map_irq func Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 20/28] hw/pci: add support for NUMA nodes Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 21/28] hw/pxb: add numa_node parameter Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 22/28] apci: fix PXB behaviour if used with unsupported BIOS Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 23/28] docs: Add PXB documentation Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 24/28] pc-dimm: don't assert if pc-dimm alignment != hotpluggable mem range size Michael S. Tsirkin
2015-06-04 11:11 ` Michael S. Tsirkin [this message]
2015-06-04 11:11 ` [Qemu-devel] [PULL 26/28] hw/acpi: move "etc/system-states" fw_cfg file from PIIX4 to core Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 27/28] hw/acpi: piix4_pm_init(): take fw_cfg object no more Michael S. Tsirkin
2015-06-04 11:11 ` [Qemu-devel] [PULL 28/28] vhost: logs sharing Michael S. Tsirkin
2015-06-05 11:03 ` [Qemu-devel] [PULL 00/28] pc, acpi, virtio, tpm Peter Maydell
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=1433416111-19022-26-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=amit.shah@redhat.com \
--cc=aurelien@aurel32.net \
--cc=ehabkost@redhat.com \
--cc=leon.alrae@imgtec.com \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).