aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-10-17 11:45:24 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-10-20 17:23:28 -0500
commit4441a2870a669b9dd0f79a040850412f3d8428ca (patch)
tree00075db54da91fbd00ebb295f1403c4b72353144
parent0f53994f7ad4d34e0a0a4a10cb71b2f936e25e3f (diff)
downloadqemu-4441a2870a669b9dd0f79a040850412f3d8428ca.zip
qemu-4441a2870a669b9dd0f79a040850412f3d8428ca.tar.gz
qemu-4441a2870a669b9dd0f79a040850412f3d8428ca.tar.bz2
Use defines instead of numbers for pci hotplug sts bit
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/acpi_piix4.c6
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);
}