[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/15] accel/accel: Replace current_machine by qdev_get_machine()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 14/15] accel/accel: Replace current_machine by qdev_get_machine() |
Date: |
Thu, 9 Jan 2020 16:21:32 +0100 |
As we want to remove the global current_machine,
replace 'current_machine' by MACHINE(qdev_get_machine()).
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
accel/accel.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/accel/accel.c b/accel/accel.c
index cb555e3b06..777d6ba119 100644
--- a/accel/accel.c
+++ b/accel/accel.c
@@ -65,7 +65,9 @@ int accel_init_machine(AccelState *accel, MachineState *ms)
AccelState *current_accel(void)
{
- return current_machine->accelerator;
+ MachineState *ms = MACHINE(qdev_get_machine());
+
+ return ms->accelerator;
}
void accel_setup_post(MachineState *ms)
--
2.21.1
- [PATCH 10/15] memory: Replace current_machine by qdev_get_machine(), (continued)
- [PATCH 11/15] exec: Replace current_machine by qdev_get_machine(), Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 12/15] accel: Introduce the current_accel() method, Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 13/15] accel: Replace current_machine->accelerator by current_accel() method, Philippe Mathieu-Daudé, 2020/01/09
- [PATCH 14/15] accel/accel: Replace current_machine by qdev_get_machine(),
Philippe Mathieu-Daudé <=
- [PATCH 15/15] vl: Make current_machine a local variable, Philippe Mathieu-Daudé, 2020/01/09
- Re: [PATCH 00/15] Replace current_machine by qdev_get_machine(), Markus Armbruster, 2020/01/21