Skip to content

Commit 8fff27a

Browse files
author
Marc Zyngier
committed
irqchip/gic-v3-its: Add VPE domain infrastructure
Add the basic GICv4 VPE (vcpu in GICv4 parlance) infrastructure (irqchip, irq domain) that is going to be populated in the following patches. Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 015ec03 commit 8fff27a

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2032,6 +2032,13 @@ static const struct irq_domain_ops its_domain_ops = {
20322032
.deactivate = its_irq_domain_deactivate,
20332033
};
20342034

2035+
static struct irq_chip its_vpe_irq_chip = {
2036+
.name = "GICv4-vpe",
2037+
};
2038+
2039+
static const struct irq_domain_ops its_vpe_domain_ops = {
2040+
};
2041+
20352042
static int its_force_quiescent(void __iomem *base)
20362043
{
20372044
u32 count = 1000000; /* 1s */
@@ -2148,6 +2155,11 @@ static int its_init_domain(struct fwnode_handle *handle, struct its_node *its)
21482155
return 0;
21492156
}
21502157

2158+
static int its_init_vpe_domain(void)
2159+
{
2160+
return 0;
2161+
}
2162+
21512163
static int __init its_compute_its_list_map(struct resource *res,
21522164
void __iomem *its_base)
21532165
{
@@ -2490,6 +2502,9 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists,
24902502
struct irq_domain *parent_domain)
24912503
{
24922504
struct device_node *of_node;
2505+
struct its_node *its;
2506+
bool has_v4 = false;
2507+
int err;
24932508

24942509
its_parent = parent_domain;
24952510
of_node = to_of_node(handle);
@@ -2504,5 +2519,19 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists,
25042519
}
25052520

25062521
gic_rdists = rdists;
2507-
return its_alloc_lpi_tables();
2522+
err = its_alloc_lpi_tables();
2523+
if (err)
2524+
return err;
2525+
2526+
list_for_each_entry(its, &its_nodes, entry)
2527+
has_v4 |= its->is_v4;
2528+
2529+
if (has_v4 & rdists->has_vlpis) {
2530+
if (its_init_vpe_domain()) {
2531+
rdists->has_vlpis = false;
2532+
pr_err("ITS: Disabling GICv4 support\n");
2533+
}
2534+
}
2535+
2536+
return 0;
25082537
}

0 commit comments

Comments
 (0)