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

[mini-os master] time: unbind VIRQ_TIMER across kexec



commit c91a493dba0ff9f2ef16375c08c37670724e1468
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Wed Jul 9 16:42:06 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jul 9 16:42:06 2025 +0200

    time: unbind VIRQ_TIMER across kexec
    
    Deactivate the VIRQ_TIMER event when doing kexec() in order to be
    able to set it up again in the new kernel.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
 arch/x86/time.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/x86/time.c b/arch/x86/time.c
index 52916e1..3a2a1d2 100644
--- a/arch/x86/time.c
+++ b/arch/x86/time.c
@@ -36,6 +36,7 @@
 #include <mini-os/types.h>
 #include <mini-os/hypervisor.h>
 #include <mini-os/events.h>
+#include <mini-os/kexec.h>
 #include <mini-os/time.h>
 #include <mini-os/lib.h>
 
@@ -193,3 +194,16 @@ void fini_time(void)
     HYPERVISOR_set_timer_op(0);
     unbind_evtchn(port);
 }
+
+#ifdef CONFIG_KEXEC
+static int unbind_virq_timer(bool undo)
+{
+    if ( undo )
+        init_time();
+    else
+        fini_time();
+
+    return 0;
+}
+kexec_call(unbind_virq_timer);
+#endif
--
generated by git-patchbot for /home/xen/git/mini-os.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.