Lines Matching refs:gic_data
61 static struct gic_chip_data gic_data __read_mostly;
64 #define GIC_ID_NR (1U << GICD_TYPER_ID_BITS(gic_data.rdists.gicd_typer))
65 #define GIC_LINE_NR min(GICD_TYPER_SPIS(gic_data.rdists.gicd_typer), 1020U)
66 #define GIC_ESPI_NR GICD_TYPER_ESPIS(gic_data.rdists.gicd_typer)
131 #define gic_data_rdist() (this_cpu_ptr(gic_data.rdists.rdist))
202 return gic_data.dist_base; in gic_dist_base()
227 gic_do_wait_for_rwp(gic_data.dist_base, GICD_CTLR_RWP); in gic_dist_wait_for_rwp()
253 if (gic_data.flags & FLAGS_WORKAROUND_GICR_WAKER_MSM8996) in gic_enable_redist()
348 base = gic_data.dist_base; in gic_peek_irq()
364 base = gic_data.dist_base; in gic_poke_irq()
599 base = gic_data.dist_base; in gic_set_type()
695 if (generic_handle_domain_irq(gic_data.domain, irqnr)) { in __gic_handle_irq()
708 if (generic_handle_domain_nmi(gic_data.domain, irqnr)) { in __gic_handle_nmi()
835 void __iomem *base = gic_data.dist_base; in gic_dist_init()
870 if (gic_data.rdists.gicd_typer2 & GICD_TYPER2_nASSGIcap) { in gic_dist_init()
896 for (i = 0; i < gic_data.nr_redist_regions; i++) { in gic_iterate_rdists()
897 void __iomem *ptr = gic_data.redist_regions[i].redist_base; in gic_iterate_rdists()
910 ret = fn(gic_data.redist_regions + i, ptr); in gic_iterate_rdists()
914 if (gic_data.redist_regions[i].single_redist) in gic_iterate_rdists()
917 if (gic_data.redist_stride) { in gic_iterate_rdists()
918 ptr += gic_data.redist_stride; in gic_iterate_rdists()
954 (int)(region - gic_data.redist_regions), in __gic_populate_rdist()
997 gic_data.rdists.has_vlpis &= !!(typer & GICR_TYPER_VLPIS); in __gic_update_rdist_properties()
1008 gic_data.rdists.has_rvpeid &= !!(typer & GICR_TYPER_RVPEID); in __gic_update_rdist_properties()
1009 gic_data.rdists.has_direct_lpi &= (!!(typer & GICR_TYPER_DirectLPIS) | in __gic_update_rdist_properties()
1011 gic_data.rdists.has_rvpeid); in __gic_update_rdist_properties()
1012 gic_data.rdists.has_vpend_valid_dirty &= !!(typer & GICR_TYPER_DIRTY); in __gic_update_rdist_properties()
1015 if (WARN_ON_ONCE(gic_data.rdists.has_rvpeid && !gic_data.rdists.has_vlpis)) { in __gic_update_rdist_properties()
1016 gic_data.rdists.has_direct_lpi = false; in __gic_update_rdist_properties()
1017 gic_data.rdists.has_vlpis = false; in __gic_update_rdist_properties()
1018 gic_data.rdists.has_rvpeid = false; in __gic_update_rdist_properties()
1021 gic_data.ppi_nr = min(GICR_TYPER_NR_PPIS(typer), gic_data.ppi_nr); in __gic_update_rdist_properties()
1028 gic_data.ppi_nr = UINT_MAX; in gic_update_rdist_properties()
1030 if (WARN_ON(gic_data.ppi_nr == UINT_MAX)) in gic_update_rdist_properties()
1031 gic_data.ppi_nr = 0; in gic_update_rdist_properties()
1033 gic_data.ppi_nr, in gic_update_rdist_properties()
1034 gic_data.has_rss ? ", RSS" : "", in gic_update_rdist_properties()
1035 gic_data.rdists.has_direct_lpi ? ", DirectLPI" : ""); in gic_update_rdist_properties()
1037 if (gic_data.rdists.has_vlpis) in gic_update_rdist_properties()
1039 gic_data.rdists.has_direct_lpi ? "DirectLPI " : "", in gic_update_rdist_properties()
1040 gic_data.rdists.has_rvpeid ? "RVPEID " : "", in gic_update_rdist_properties()
1041 gic_data.rdists.has_vpend_valid_dirty ? "Valid+Dirty " : ""); in gic_update_rdist_properties()
1047 return readl_relaxed(gic_data.dist_base + GICD_CTLR) & GICD_CTLR_DS; in gic_dist_security_disabled()
1166 if (need_rss && (!gic_data.has_rss)) in gic_cpu_sys_reg_init()
1181 !!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) && in gic_dist_supports_lpis()
1196 WARN((gic_data.ppi_nr > 16 || GIC_ESPI_NR != 0) && in gic_cpu_init()
1204 for (i = 0; i < gic_data.ppi_nr + 16; i += 32) in gic_cpu_init()
1207 gic_cpu_config(rbase, gic_data.ppi_nr + 16, gic_redist_wait_for_rwp); in gic_cpu_init()
1302 .fwnode = gic_data.fwnode, in gic_smp_init()
1312 base_sgi = __irq_domain_alloc_irqs(gic_data.domain, -1, 8, in gic_smp_init()
1592 if (!gic_data.ppi_descs) in fwspec_is_partitioned_ppi()
1628 return d == gic_data.domain; in gic_irq_domain_select()
1635 return d == partition_get_domain(gic_data.ppi_descs[ppi_idx]); in gic_irq_domain_select()
1655 if (!gic_data.ppi_descs) in partition_domain_translate()
1667 ret = partition_translate_id(gic_data.ppi_descs[ppi_idx], in partition_domain_translate()
1763 ppi_nmi_refs = kcalloc(gic_data.ppi_nr, sizeof(*ppi_nmi_refs), GFP_KERNEL); in gic_enable_nmi_support()
1767 for (i = 0; i < gic_data.ppi_nr; i++) in gic_enable_nmi_support()
1834 gic_data.fwnode = handle; in gic_init_bases()
1835 gic_data.dist_base = dist_base; in gic_init_bases()
1836 gic_data.redist_regions = rdist_regs; in gic_init_bases()
1837 gic_data.nr_redist_regions = nr_redist_regions; in gic_init_bases()
1838 gic_data.redist_stride = redist_stride; in gic_init_bases()
1843 typer = readl_relaxed(gic_data.dist_base + GICD_TYPER); in gic_init_bases()
1844 gic_data.rdists.gicd_typer = typer; in gic_init_bases()
1846 gic_enable_quirks(readl_relaxed(gic_data.dist_base + GICD_IIDR), in gic_init_bases()
1847 gic_quirks, &gic_data); in gic_init_bases()
1856 if (!(gic_data.flags & FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539)) in gic_init_bases()
1857 gic_data.rdists.gicd_typer2 = readl_relaxed(gic_data.dist_base + GICD_TYPER2); in gic_init_bases()
1859 gic_data.domain = irq_domain_create_tree(handle, &gic_irq_domain_ops, in gic_init_bases()
1860 &gic_data); in gic_init_bases()
1861 gic_data.rdists.rdist = alloc_percpu(typeof(*gic_data.rdists.rdist)); in gic_init_bases()
1862 gic_data.rdists.has_rvpeid = true; in gic_init_bases()
1863 gic_data.rdists.has_vlpis = true; in gic_init_bases()
1864 gic_data.rdists.has_direct_lpi = true; in gic_init_bases()
1865 gic_data.rdists.has_vpend_valid_dirty = true; in gic_init_bases()
1867 if (WARN_ON(!gic_data.domain) || WARN_ON(!gic_data.rdists.rdist)) { in gic_init_bases()
1872 irq_domain_update_bus_token(gic_data.domain, DOMAIN_BUS_WIRED); in gic_init_bases()
1874 gic_data.has_rss = !!(typer & GICD_TYPER_RSS); in gic_init_bases()
1877 err = mbi_init(handle, gic_data.domain); in gic_init_bases()
1892 its_init(handle, &gic_data.rdists, gic_data.domain); in gic_init_bases()
1897 gicv2m_init(handle, gic_data.domain); in gic_init_bases()
1905 if (gic_data.domain) in gic_init_bases()
1906 irq_domain_remove(gic_data.domain); in gic_init_bases()
1907 free_percpu(gic_data.rdists.rdist); in gic_init_bases()
1933 gic_data.ppi_descs = kcalloc(gic_data.ppi_nr, sizeof(*gic_data.ppi_descs), GFP_KERNEL); in gic_populate_ppi_partitions()
1934 if (!gic_data.ppi_descs) in gic_populate_ppi_partitions()
1991 for (i = 0; i < gic_data.ppi_nr; i++) { in gic_populate_ppi_partitions()
1995 .fwnode = gic_data.fwnode, in gic_populate_ppi_partitions()
2007 desc = partition_create_desc(gic_data.fwnode, parts, nr_parts, in gic_populate_ppi_partitions()
2012 gic_data.ppi_descs[i] = desc; in gic_populate_ppi_partitions()
2040 gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; in gic_of_setup_kvm_info()
2041 gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; in gic_of_setup_kvm_info()
2113 gic_enable_of_quirks(node, gic_quirks, &gic_data); in gic_of_init()
2379 gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; in gic_acpi_setup_kvm_info()
2380 gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; in gic_acpi_setup_kvm_info()