Lines Matching refs:gic_data

74 static struct gic_chip_data gic_data __read_mostly;
77 #define GIC_ID_NR (1U << GICD_TYPER_ID_BITS(gic_data.rdists.gicd_typer))
78 #define GIC_LINE_NR min(GICD_TYPER_SPIS(gic_data.rdists.gicd_typer), 1020U)
79 #define GIC_ESPI_NR GICD_TYPER_ESPIS(gic_data.rdists.gicd_typer)
135 #define gic_data_rdist() (this_cpu_ptr(gic_data.rdists.rdist))
224 return gic_data.dist_base; in gic_dist_base_alias()
239 return gic_data.dist_base; in gic_dist_base()
264 gic_do_wait_for_rwp(gic_data.dist_base, GICD_CTLR_RWP); in gic_dist_wait_for_rwp()
290 if (gic_data.flags & FLAGS_WORKAROUND_GICR_WAKER_MSM8996) in gic_enable_redist()
401 base = gic_data.dist_base; in gic_poke_irq()
701 if (unlikely(gic_data.flags & FLAGS_WORKAROUND_ASR_ERRATUM_8601001)) in gic_cpu_to_affinity()
771 if (generic_handle_domain_irq(gic_data.domain, irqnr)) { in __gic_handle_irq()
784 if (generic_handle_domain_nmi(gic_data.domain, irqnr)) { in __gic_handle_nmi()
911 void __iomem *base = gic_data.dist_base; in gic_dist_init()
946 if (gic_data.rdists.gicd_typer2 & GICD_TYPER2_nASSGIcap) { in gic_dist_init()
972 for (i = 0; i < gic_data.nr_redist_regions; i++) { in gic_iterate_rdists()
973 void __iomem *ptr = gic_data.redist_regions[i].redist_base; in gic_iterate_rdists()
986 ret = fn(gic_data.redist_regions + i, ptr); in gic_iterate_rdists()
990 if (gic_data.redist_regions[i].single_redist) in gic_iterate_rdists()
993 if (gic_data.redist_stride) { in gic_iterate_rdists()
994 ptr += gic_data.redist_stride; in gic_iterate_rdists()
1032 (int)(region - gic_data.redist_regions), in __gic_populate_rdist()
1075 gic_data.rdists.has_vlpis &= !!(typer & GICR_TYPER_VLPIS); in __gic_update_rdist_properties()
1086 gic_data.rdists.has_rvpeid &= !!(typer & GICR_TYPER_RVPEID); in __gic_update_rdist_properties()
1087 gic_data.rdists.has_direct_lpi &= (!!(typer & GICR_TYPER_DirectLPIS) | in __gic_update_rdist_properties()
1089 gic_data.rdists.has_rvpeid); in __gic_update_rdist_properties()
1090 gic_data.rdists.has_vpend_valid_dirty &= !!(typer & GICR_TYPER_DIRTY); in __gic_update_rdist_properties()
1093 if (WARN_ON_ONCE(gic_data.rdists.has_rvpeid && !gic_data.rdists.has_vlpis)) { in __gic_update_rdist_properties()
1094 gic_data.rdists.has_direct_lpi = false; in __gic_update_rdist_properties()
1095 gic_data.rdists.has_vlpis = false; in __gic_update_rdist_properties()
1096 gic_data.rdists.has_rvpeid = false; in __gic_update_rdist_properties()
1099 gic_data.ppi_nr = min(GICR_TYPER_NR_PPIS(typer), gic_data.ppi_nr); in __gic_update_rdist_properties()
1106 gic_data.ppi_nr = UINT_MAX; in gic_update_rdist_properties()
1108 if (WARN_ON(gic_data.ppi_nr == UINT_MAX)) in gic_update_rdist_properties()
1109 gic_data.ppi_nr = 0; in gic_update_rdist_properties()
1111 gic_data.ppi_nr, in gic_update_rdist_properties()
1112 gic_data.has_rss ? ", RSS" : "", in gic_update_rdist_properties()
1113 gic_data.rdists.has_direct_lpi ? ", DirectLPI" : ""); in gic_update_rdist_properties()
1115 if (gic_data.rdists.has_vlpis) in gic_update_rdist_properties()
1117 gic_data.rdists.has_direct_lpi ? "DirectLPI " : "", in gic_update_rdist_properties()
1118 gic_data.rdists.has_rvpeid ? "RVPEID " : "", in gic_update_rdist_properties()
1119 gic_data.rdists.has_vpend_valid_dirty ? "Valid+Dirty " : ""); in gic_update_rdist_properties()
1125 return readl_relaxed(gic_data.dist_base + GICD_CTLR) & GICD_CTLR_DS; in gic_dist_security_disabled()
1244 if (need_rss && (!gic_data.has_rss)) in gic_cpu_sys_reg_init()
1259 !!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) && in gic_dist_supports_lpis()
1274 WARN((gic_data.ppi_nr > 16 || GIC_ESPI_NR != 0) && in gic_cpu_init()
1282 for (i = 0; i < gic_data.ppi_nr + 16; i += 32) in gic_cpu_init()
1285 gic_cpu_config(rbase, gic_data.ppi_nr + 16, gic_redist_wait_for_rwp); in gic_cpu_init()
1382 .fwnode = gic_data.fwnode, in gic_smp_init()
1392 base_sgi = irq_domain_alloc_irqs(gic_data.domain, 8, NUMA_NO_NODE, &sgi_fwspec); in gic_smp_init()
1670 if (!gic_data.ppi_descs) in fwspec_is_partitioned_ppi()
1706 return d == gic_data.domain; in gic_irq_domain_select()
1713 return d == partition_get_domain(gic_data.ppi_descs[ppi_idx]); in gic_irq_domain_select()
1733 if (!gic_data.ppi_descs) in partition_domain_translate()
1745 ret = partition_translate_id(gic_data.ppi_descs[ppi_idx], in partition_domain_translate()
1824 for (i = 0; i < gic_data.nr_redist_regions; i++) { in gic_enable_quirk_nvidia_t241()
1826 (u64)gic_data.redist_regions[i].phys_base)); in gic_enable_quirk_nvidia_t241()
1835 phys = gic_data.dist_phys_base + T241_CHIP_GICDA_OFFSET; in gic_enable_quirk_nvidia_t241()
1950 if (gic_data.flags & FLAGS_WORKAROUND_MTK_GICR_SAVE) { in gic_enable_nmi_support()
1955 ppi_nmi_refs = kcalloc(gic_data.ppi_nr, sizeof(*ppi_nmi_refs), GFP_KERNEL); in gic_enable_nmi_support()
1959 for (i = 0; i < gic_data.ppi_nr; i++) in gic_enable_nmi_support()
2019 gic_data.fwnode = handle; in gic_init_bases()
2020 gic_data.dist_phys_base = dist_phys_base; in gic_init_bases()
2021 gic_data.dist_base = dist_base; in gic_init_bases()
2022 gic_data.redist_regions = rdist_regs; in gic_init_bases()
2023 gic_data.nr_redist_regions = nr_redist_regions; in gic_init_bases()
2024 gic_data.redist_stride = redist_stride; in gic_init_bases()
2029 typer = readl_relaxed(gic_data.dist_base + GICD_TYPER); in gic_init_bases()
2030 gic_data.rdists.gicd_typer = typer; in gic_init_bases()
2032 gic_enable_quirks(readl_relaxed(gic_data.dist_base + GICD_IIDR), in gic_init_bases()
2033 gic_quirks, &gic_data); in gic_init_bases()
2042 if (!(gic_data.flags & FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539)) in gic_init_bases()
2043 gic_data.rdists.gicd_typer2 = readl_relaxed(gic_data.dist_base + GICD_TYPER2); in gic_init_bases()
2045 gic_data.domain = irq_domain_create_tree(handle, &gic_irq_domain_ops, in gic_init_bases()
2046 &gic_data); in gic_init_bases()
2047 gic_data.rdists.rdist = alloc_percpu(typeof(*gic_data.rdists.rdist)); in gic_init_bases()
2050 gic_data.rdists.has_rvpeid = true; in gic_init_bases()
2051 gic_data.rdists.has_vlpis = true; in gic_init_bases()
2052 gic_data.rdists.has_direct_lpi = true; in gic_init_bases()
2053 gic_data.rdists.has_vpend_valid_dirty = true; in gic_init_bases()
2056 if (WARN_ON(!gic_data.domain) || WARN_ON(!gic_data.rdists.rdist)) { in gic_init_bases()
2061 irq_domain_update_bus_token(gic_data.domain, DOMAIN_BUS_WIRED); in gic_init_bases()
2063 gic_data.has_rss = !!(typer & GICD_TYPER_RSS); in gic_init_bases()
2066 err = mbi_init(handle, gic_data.domain); in gic_init_bases()
2081 its_init(handle, &gic_data.rdists, gic_data.domain); in gic_init_bases()
2086 gicv2m_init(handle, gic_data.domain); in gic_init_bases()
2094 if (gic_data.domain) in gic_init_bases()
2095 irq_domain_remove(gic_data.domain); in gic_init_bases()
2096 free_percpu(gic_data.rdists.rdist); in gic_init_bases()
2122 gic_data.ppi_descs = kcalloc(gic_data.ppi_nr, sizeof(*gic_data.ppi_descs), GFP_KERNEL); in gic_populate_ppi_partitions()
2123 if (!gic_data.ppi_descs) in gic_populate_ppi_partitions()
2180 for (i = 0; i < gic_data.ppi_nr; i++) { in gic_populate_ppi_partitions()
2184 .fwnode = gic_data.fwnode, in gic_populate_ppi_partitions()
2196 desc = partition_create_desc(gic_data.fwnode, parts, nr_parts, in gic_populate_ppi_partitions()
2201 gic_data.ppi_descs[i] = desc; in gic_populate_ppi_partitions()
2229 gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; in gic_of_setup_kvm_info()
2230 gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; in gic_of_setup_kvm_info()
2305 gic_enable_of_quirks(node, gic_quirks, &gic_data); in gic_of_init()
2571 gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; in gic_acpi_setup_kvm_info()
2572 gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; in gic_acpi_setup_kvm_info()