qemu-devel
[Top][All Lists]
Advanced

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

[PATCH-for-9.1 5/7] hw/core: Restrict reset handlers API to system emula


From: Philippe Mathieu-Daudé
Subject: [PATCH-for-9.1 5/7] hw/core: Restrict reset handlers API to system emulation
Date: Thu, 4 Apr 2024 21:47:55 +0200

Headers in include/sysemu/ are specific to system
emulation and should not be used in user emulation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/core/reset.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/core/reset.c b/hw/core/reset.c
index d50da7e304..167c8bf1a9 100644
--- a/hw/core/reset.c
+++ b/hw/core/reset.c
@@ -24,7 +24,9 @@
  */
 
 #include "qemu/osdep.h"
+#ifndef CONFIG_USER_ONLY
 #include "sysemu/reset.h"
+#endif
 #include "hw/resettable.h"
 #include "hw/core/resetcontainer.h"
 
@@ -43,6 +45,7 @@ static ResettableContainer *get_root_reset_container(void)
     return root_reset_container;
 }
 
+#ifndef CONFIG_USER_ONLY
 /*
  * Reason why the currently in-progress qemu_devices_reset() was called.
  * If we made at least SHUTDOWN_CAUSE_SNAPSHOT_LOAD have a corresponding
@@ -185,3 +188,4 @@ void qemu_devices_reset(ShutdownCause reason)
     /* Reset the simulation */
     resettable_reset(OBJECT(get_root_reset_container()), RESET_TYPE_COLD);
 }
+#endif
-- 
2.41.0




reply via email to

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