All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Marcel Apfelbaum <marcel.a@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>, John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [PATCH v2 3/5] ich9: Remove enable_tco arguments from init functions
Date: Sat, 23 Jan 2016 14:02:11 -0200	[thread overview]
Message-ID: <1453564933-29638-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1453564933-29638-1-git-send-email-ehabkost@redhat.com>

The enable_tco arguments are always true, so they are not needed
anymore.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/acpi/ich9.c         | 8 +++-----
 hw/i386/pc_q35.c       | 2 +-
 hw/isa/lpc_ich9.c      | 4 ++--
 include/hw/acpi/ich9.h | 1 -
 include/hw/i386/ich9.h | 2 +-
 5 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 1c7fcfa..a4bd98c 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -239,7 +239,7 @@ static void pm_powerdown_req(Notifier *n, void *opaque)
 }
 
 void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
-                  bool smm_enabled, bool enable_tco,
+                  bool smm_enabled,
                   qemu_irq sci_irq)
 {
     memory_region_init(&pm->io, OBJECT(lpc_pci), "ich9-pm", ICH9_PMIO_SIZE);
@@ -263,10 +263,8 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
 
     pm->smm_enabled = smm_enabled;
 
-    pm->enable_tco = enable_tco;
-    if (pm->enable_tco) {
-        acpi_pm_tco_init(&pm->tco_regs, &pm->io);
-    }
+    pm->enable_tco = true;
+    acpi_pm_tco_init(&pm->tco_regs, &pm->io);
 
     pm->irq = sci_irq;
     qemu_register_reset(pm_reset, pm);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 8773efb..b61f7a6 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -234,7 +234,7 @@ static void pc_q35_init(MachineState *machine)
                          (pcms->vmport != ON_OFF_AUTO_ON), 0xff0104);
 
     /* connect pm stuff to lpc */
-    ich9_lpc_pm_init(lpc, pc_machine_is_smm_enabled(pcms), true);
+    ich9_lpc_pm_init(lpc, pc_machine_is_smm_enabled(pcms));
 
     /* ahci and SATA device, for q35 1 ahci controller is built-in */
     ahci = pci_create_simple_multifunction(host_bus,
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index ed9907d..362d187 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -368,13 +368,13 @@ static void ich9_set_sci(void *opaque, int irq_num, int level)
     }
 }
 
-void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled, bool enable_tco)
+void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled)
 {
     ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci);
     qemu_irq sci_irq;
 
     sci_irq = qemu_allocate_irq(ich9_set_sci, lpc, 0);
-    ich9_pm_init(lpc_pci, &lpc->pm, smm_enabled, enable_tco, sci_irq);
+    ich9_pm_init(lpc_pci, &lpc->pm, smm_enabled, sci_irq);
     ich9_lpc_reset(&lpc->d.qdev);
 }
 
diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h
index 345fd8d..63fa198 100644
--- a/include/hw/acpi/ich9.h
+++ b/include/hw/acpi/ich9.h
@@ -62,7 +62,6 @@ typedef struct ICH9LPCPMRegs {
 
 void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm,
                   bool smm_enabled,
-                  bool enable_tco,
                   qemu_irq sci_irq);
 
 void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base);
diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
index b9d2b04..b411434 100644
--- a/include/hw/i386/ich9.h
+++ b/include/hw/i386/ich9.h
@@ -17,7 +17,7 @@
 void ich9_lpc_set_irq(void *opaque, int irq_num, int level);
 int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx);
 PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin);
-void ich9_lpc_pm_init(PCIDevice *pci_lpc, bool smm_enabled, bool enable_tco);
+void ich9_lpc_pm_init(PCIDevice *pci_lpc, bool smm_enabled);
 I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
 
 void ich9_generate_smi(void);
-- 
2.1.0

  parent reply	other threads:[~2016-01-23 16:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 16:02 [Qemu-devel] [PATCH v2 0/5] q35: Remove old machines and unused compat code Eduardo Habkost
2016-01-23 16:02 ` [Qemu-devel] [PATCH v2 1/5] q35: Remove old machine versions Eduardo Habkost
2016-01-23 16:02 ` [Qemu-devel] [PATCH v2 2/5] machine: Remove no_tco field Eduardo Habkost
2016-01-23 16:02 ` Eduardo Habkost [this message]
2016-01-23 16:02 ` [Qemu-devel] [PATCH v2 4/5] q35: Remove unused q35-acpi-dsdt.aml file Eduardo Habkost
2016-01-23 16:02 ` [Qemu-devel] [PATCH v2 5/5] q35: No need to check gigabyte_align Eduardo Habkost
2016-01-25 11:27 ` [Qemu-devel] [PATCH v2 0/5] q35: Remove old machines and unused compat code Laszlo Ersek
2016-01-26 10:15   ` Igor Mammedov
2016-01-26 14:49     ` Laszlo Ersek
2016-01-26 10:17 ` Igor Mammedov
2016-01-26 14:59 ` [Qemu-devel] [PATCH 6/5] pc: Remove unused pc_acpi_init() function Eduardo Habkost
2016-01-26 17:27   ` Laszlo Ersek
2016-01-26 14:59 ` [Qemu-devel] [PATCH 7/5] acpi: Remove unused acpi_table_add_builtin() function Eduardo Habkost
2016-01-26 17:27   ` Laszlo Ersek
2016-01-27 17:08   ` Igor Mammedov
2016-02-04 16:01 ` [Qemu-devel] [PATCH v2 0/5] q35: Remove old machines and unused compat code Michael S. Tsirkin
2016-02-04 17:16   ` Eduardo Habkost
2016-02-04 18:02     ` Michael S. Tsirkin
2016-02-04 19:09       ` Eduardo Habkost
2016-02-04 22:14         ` Michael S. Tsirkin
2016-02-05  9:09           ` Markus Armbruster
2016-02-05 14:46           ` Eduardo Habkost
2016-02-06 18:34             ` Michael S. Tsirkin
2016-02-11 15:51               ` Eduardo Habkost
2016-02-11 16:33                 ` Michael S. Tsirkin
2016-02-11 17:24                   ` Eduardo Habkost
2016-02-11 20:49                   ` Paolo Bonzini
2016-02-11 20:49                   ` Paolo Bonzini
2016-02-12 10:58                   ` Markus Armbruster
2016-02-18 11:18                     ` Markus Armbruster
2016-02-18 12:07                       ` Michael S. Tsirkin
2016-02-18 12:46                         ` Markus Armbruster
2016-02-05  8:55       ` Markus Armbruster
2016-02-07 10:17         ` Michael S. Tsirkin
2016-02-08 11:59           ` Markus Armbruster
2016-02-18 12:39 ` Markus Armbruster
2016-02-18 23:17   ` Eduardo Habkost
2016-02-19  8:29     ` Markus Armbruster
2016-02-23 13:00 ` Michael S. Tsirkin

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=1453564933-29638-4-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=armbru@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=lersek@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.