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

[xen staging] xen/riscv: implement make_timer_node()



commit 913cf380cfc9b60086c0aca2c325311085c56a87
Author:     Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
AuthorDate: Wed Sep 9 17:07:24 2026 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 21 10:07:11 2026 +0200

    xen/riscv: implement make_timer_node()
    
    Generally, in DT for RISC-V there is a document which describes a timer
    node (riscv,timer.yaml or sifive,clint.yaml), but the Linux timer driver
    is declared with TIMER_OF_DECLARE(riscv_timer, "riscv", ...).
    It matches the CPU node (compatible "riscv"), not the timer node itself.
    It then calls of_find_compatible_node(NULL, NULL, "riscv,timer") only to
    read the optional riscv,timer-cannot-wake-cpu property.
    
    Since Xen does not care about that property for now, make_timer_node() is
    implemented to return 0, as no timer node needs to be created for RISC-V
    guests.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/riscv/domain-build.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/arch/riscv/domain-build.c b/xen/arch/riscv/domain-build.c
index 1af4c48fb3..d7613721db 100644
--- a/xen/arch/riscv/domain-build.c
+++ b/xen/arch/riscv/domain-build.c
@@ -3,6 +3,7 @@
 #include <xen/fdt-domain-build.h>
 #include <xen/fdt-kernel.h>
 #include <xen/init.h>
+#include <xen/fdt-kernel.h>
 #include <xen/libfdt/libfdt.h>
 #include <xen/sched.h>
 
@@ -154,3 +155,10 @@ int __init make_cpus_node(const struct domain *d, struct 
kernel_info *kinfo)
 
     return fdt_end_node(fdt);
 }
+
+int __init make_timer_node(const struct kernel_info *kinfo)
+{
+    /* There is no need for timer node for RISC-V. */
+
+    return 0;
+}
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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