qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/2] Use defines instead of numbers for pci hotp


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/2] Use defines instead of numbers for pci hotplug sts bit
Date: Wed, 20 Oct 2010 17:24:04 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Lightning/1.0b1 Thunderbird/3.0.8

On 10/17/2010 04:45 AM, Gleb Natapov wrote:
Signed-off-by: Gleb Natapov<address@hidden>

Applied both.  Thanks.

Regards,

Anthony Liguori

---
  hw/acpi_piix4.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index c8733e5..bec42b4 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -38,6 +38,8 @@
  #define PCI_BASE 0xae00
  #define PCI_EJ_BASE 0xae08

+#define PIIX4_PCI_HOTPLUG_STATUS 2
+
  struct gpe_regs {
      uint16_t sts; /* status */
      uint16_t en;  /* enabled */
@@ -596,13 +598,13 @@ static void piix4_acpi_system_hot_add_init(PCIBus *bus, 
PIIX4PMState *s)

  static void enable_device(PIIX4PMState *s, int slot)
  {
-    s->gpe.sts |= 2;
+    s->gpe.sts |= PIIX4_PCI_HOTPLUG_STATUS;
      s->pci0_status.up |= (1<<  slot);
  }

  static void disable_device(PIIX4PMState *s, int slot)
  {
-    s->gpe.sts |= 2;
+    s->gpe.sts |= PIIX4_PCI_HOTPLUG_STATUS;
      s->pci0_status.down |= (1<<  slot);
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]