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>

+30 -1
+30 -1
drivers/irqchip/irq-gic-v3-its.c
··· 2032 2032 .deactivate = its_irq_domain_deactivate, 2033 2033 }; 2034 2034 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 + 2035 2042 static int its_force_quiescent(void __iomem *base) 2036 2043 { 2037 2044 u32 count = 1000000; /* 1s */ ··· 2152 2145 info->data = its; 2153 2146 inner_domain->host_data = info; 2154 2147 2148 + return 0; 2149 + } 2150 + 2151 + static int its_init_vpe_domain(void) 2152 + { 2155 2153 return 0; 2156 2154 } 2157 2155 ··· 2502 2490 struct irq_domain *parent_domain) 2503 2491 { 2504 2492 struct device_node *of_node; 2493 + struct its_node *its; 2494 + bool has_v4 = false; 2495 + int err; 2505 2496 2506 2497 its_parent = parent_domain; 2507 2498 of_node = to_of_node(handle); ··· 2519 2504 } 2520 2505 2521 2506 gic_rdists = rdists; 2522 - return its_alloc_lpi_tables(); 2507 + err = its_alloc_lpi_tables(); 2508 + if (err) 2509 + return err; 2510 + 2511 + list_for_each_entry(its, &its_nodes, entry) 2512 + has_v4 |= its->is_v4; 2513 + 2514 + if (has_v4 & rdists->has_vlpis) { 2515 + if (its_init_vpe_domain()) { 2516 + rdists->has_vlpis = false; 2517 + pr_err("ITS: Disabling GICv4 support\n"); 2518 + } 2519 + } 2520 + 2521 + return 0; 2523 2522 }