[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] target-sparc: use notifier for signaling guest
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 4/5] target-sparc: use notifier for signaling guest system_powerdown command |
Date: |
Wed, 5 Sep 2012 23:06:24 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/sun4m.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 0f909b5..c98cd5e 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -472,6 +472,17 @@ static void slavio_timer_init_all(target_phys_addr_t addr,
qemu_irq master_irq,
}
}
+static qemu_irq slavio_system_powerdown;
+
+static void slavio_powerdown_req(Notifier *n, void *opaque)
+{
+ qemu_irq_raise(slavio_system_powerdown);
+}
+
+static Notifier slavio_system_powerdown_notifier = {
+ .notify = slavio_powerdown_req
+};
+
#define MISC_LEDS 0x01600000
#define MISC_CFG 0x01800000
#define MISC_DIAG 0x01a00000
@@ -514,7 +525,8 @@ static void slavio_misc_init(target_phys_addr_t base,
}
sysbus_connect_irq(s, 0, irq);
sysbus_connect_irq(s, 1, fdc_tc);
- qemu_system_powerdown = qdev_get_gpio_in(dev, 0);
+ slavio_system_powerdown = qdev_get_gpio_in(dev, 0);
+ qemu_register_powerdown_notifier(&slavio_system_powerdown_notifier);
}
static void ecc_init(target_phys_addr_t base, qemu_irq irq, uint32_t version)
--
1.7.11.4
- [Qemu-devel] [PATCH 0/5 v3] convert system_powerdown command to notifiers, Igor Mammedov, 2012/09/05
- [Qemu-devel] [PATCH 1/5] Introduce powerdown_notifiers, Igor Mammedov, 2012/09/05
- [Qemu-devel] [PATCH 2/5] acpi: use notifier for signaling guest system_powerdown command, Igor Mammedov, 2012/09/05
- [Qemu-devel] [PATCH 3/5] target-arm: use notifier for signaling guest system_powerdown command, Igor Mammedov, 2012/09/05
- [Qemu-devel] [PATCH 4/5] target-sparc: use notifier for signaling guest system_powerdown command,
Igor Mammedov <=
- [Qemu-devel] [PATCH 5/5] Cleanup unused global var qemu_system_powerdown, Igor Mammedov, 2012/09/05
- Re: [Qemu-devel] [PATCH 0/5 v3] convert system_powerdown command to notifiers, Paolo Bonzini, 2012/09/06
- Re: [Qemu-devel] [PATCH 0/5 v3] convert system_powerdown command to notifiers, Igor Mammedov, 2012/09/18
- Re: [Qemu-devel] [PATCH 0/5 v3] convert system_powerdown command to notifiers, Anthony Liguori, 2012/09/26