xen/riscv: implement init_intc_phandle()

Implement init_intc_phandle() to read phandle of interrupt controller
node and save it in kernel->phandle_intc for the future usage during
creation of guest interrupt controller node.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2026-09-30 14:59:30 +02:00
1 parent baf59543bf
commit 9270ddf05a
1 file changed
+17
+17
View File
@@ -4,9 +4,26 @@
#include <xen/device_tree.h>
#include <xen/fdt-kernel.h>
#include <xen/init.h>
#include <xen/libfdt/libfdt.h>
#include <asm/p2m.h>
int __init init_intc_phandle(struct kernel_info *kinfo, const char *name,
const int node_next, const void *pfdt)
{
if ( dt_node_cmp(name, "intc") == 0 )
{
uint32_t phandle_intc = fdt_get_phandle(pfdt, node_next);
if ( phandle_intc != 0 )
kinfo->phandle_intc = phandle_intc;
return 0;
}
return 1;
}
int __init make_arch_nodes(struct kernel_info *kinfo)
{
/* No RISC-V specific nodes need to be made, at the moment. */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.