mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/riscv: implement make_intc_domU_node()
Introduce a RISC-V specific function to create an interrupt controller Device Tree node for DomU domains during dom0less build. Add make_intc_domU_node() to the dom0less build path and wire it to a new generic helper, intc_make_domu_dt_node(), which delegates DT node creation to the active interrupt controller implementation via vintc_init_ops. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
c91771c85c
commit
ff930346ef
3 files changed
+20
No files matched your search
@@ -97,6 +97,8 @@ struct arch_domain {
|
||||
struct paging_domain paging;
|
||||
|
||||
const unsigned long *isa;
|
||||
|
||||
struct vintc *vintc;
|
||||
};
|
||||
|
||||
#include <xen/sched.h>
|
||||
|
||||
@@ -16,6 +16,7 @@ enum intc_variant {
|
||||
|
||||
struct cpu_user_regs;
|
||||
struct irq_desc;
|
||||
struct kernel_info;
|
||||
|
||||
struct intc_info {
|
||||
enum intc_variant hw_variant;
|
||||
@@ -47,6 +48,15 @@ struct intc_hw_init_ops {
|
||||
int (*init)(void);
|
||||
};
|
||||
|
||||
struct vintc_init_ops {
|
||||
/* Create interrupt controller node for domain */
|
||||
int (*make_domu_dt_node)(struct kernel_info *kinfo);
|
||||
};
|
||||
|
||||
struct vintc {
|
||||
const struct vintc_init_ops *init_ops;
|
||||
};
|
||||
|
||||
void intc_preinit(void);
|
||||
|
||||
void register_intc_ops(const struct intc_hw_init_ops *init_ops);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <xen/acpi.h>
|
||||
#include <xen/bug.h>
|
||||
#include <xen/device_tree.h>
|
||||
#include <xen/fdt-kernel.h>
|
||||
#include <xen/init.h>
|
||||
#include <xen/irq.h>
|
||||
#include <xen/lib.h>
|
||||
@@ -72,3 +73,10 @@ void intc_route_irq_to_xen(struct irq_desc *desc, unsigned int priority)
|
||||
intc_set_irq_type(desc, desc->arch.type);
|
||||
intc_set_irq_priority(desc, priority);
|
||||
}
|
||||
|
||||
int __init make_intc_domU_node(struct kernel_info *kinfo)
|
||||
{
|
||||
const struct vintc *vintc = kinfo->bd.d->arch.vintc;
|
||||
|
||||
return vintc->init_ops->make_domu_dt_node(kinfo);
|
||||
}
|
||||