• Home
  • Raw
  • Download

Lines Matching refs:gic_data

75 static struct gic_chip_data gic_data __read_mostly;
78 #define GIC_ID_NR (1U << GICD_TYPER_ID_BITS(gic_data.rdists.gicd_typer))
79 #define GIC_LINE_NR min(GICD_TYPER_SPIS(gic_data.rdists.gicd_typer), 1020U)
80 #define GIC_ESPI_NR GICD_TYPER_ESPIS(gic_data.rdists.gicd_typer)
136 #define gic_data_rdist() (this_cpu_ptr(gic_data.rdists.rdist))
225 return gic_data.dist_base; in gic_dist_base_alias()
240 return gic_data.dist_base; in gic_dist_base()
265 gic_do_wait_for_rwp(gic_data.dist_base, GICD_CTLR_RWP); in gic_dist_wait_for_rwp()
291 if (gic_data.flags & FLAGS_WORKAROUND_GICR_WAKER_MSM8996) in gic_enable_redist()
402 base = gic_data.dist_base; in gic_poke_irq()
702 if (unlikely(gic_data.flags & FLAGS_WORKAROUND_ASR_ERRATUM_8601001)) in gic_cpu_to_affinity()
772 if (generic_handle_domain_irq(gic_data.domain, irqnr)) { in __gic_handle_irq()
785 if (generic_handle_domain_nmi(gic_data.domain, irqnr)) { in __gic_handle_nmi()
912 void __iomem *base = gic_data.dist_base; in gic_dist_init()
947 if (gic_data.rdists.gicd_typer2 & GICD_TYPER2_nASSGIcap) { in gic_dist_init()
977 for (i = 0; i < gic_data.nr_redist_regions; i++) { in gic_iterate_rdists()
978 void __iomem *ptr = gic_data.redist_regions[i].redist_base; in gic_iterate_rdists()
991 ret = fn(gic_data.redist_regions + i, ptr); in gic_iterate_rdists()
995 if (gic_data.redist_regions[i].single_redist) in gic_iterate_rdists()
998 if (gic_data.redist_stride) { in gic_iterate_rdists()
999 ptr += gic_data.redist_stride; in gic_iterate_rdists()
1037 (int)(region - gic_data.redist_regions), in __gic_populate_rdist()
1080 gic_data.rdists.has_vlpis &= !!(typer & GICR_TYPER_VLPIS); in __gic_update_rdist_properties()
1091 gic_data.rdists.has_rvpeid &= !!(typer & GICR_TYPER_RVPEID); in __gic_update_rdist_properties()
1092 gic_data.rdists.has_direct_lpi &= (!!(typer & GICR_TYPER_DirectLPIS) | in __gic_update_rdist_properties()
1094 gic_data.rdists.has_rvpeid); in __gic_update_rdist_properties()
1095 gic_data.rdists.has_vpend_valid_dirty &= !!(typer & GICR_TYPER_DIRTY); in __gic_update_rdist_properties()
1098 if (WARN_ON_ONCE(gic_data.rdists.has_rvpeid && !gic_data.rdists.has_vlpis)) { in __gic_update_rdist_properties()
1099 gic_data.rdists.has_direct_lpi = false; in __gic_update_rdist_properties()
1100 gic_data.rdists.has_vlpis = false; in __gic_update_rdist_properties()
1101 gic_data.rdists.has_rvpeid = false; in __gic_update_rdist_properties()
1104 gic_data.ppi_nr = min(GICR_TYPER_NR_PPIS(typer), gic_data.ppi_nr); in __gic_update_rdist_properties()
1111 gic_data.ppi_nr = UINT_MAX; in gic_update_rdist_properties()
1113 if (WARN_ON(gic_data.ppi_nr == UINT_MAX)) in gic_update_rdist_properties()
1114 gic_data.ppi_nr = 0; in gic_update_rdist_properties()
1116 gic_data.ppi_nr, in gic_update_rdist_properties()
1117 gic_data.has_rss ? ", RSS" : "", in gic_update_rdist_properties()
1118 gic_data.rdists.has_direct_lpi ? ", DirectLPI" : ""); in gic_update_rdist_properties()
1120 if (gic_data.rdists.has_vlpis) in gic_update_rdist_properties()
1122 gic_data.rdists.has_direct_lpi ? "DirectLPI " : "", in gic_update_rdist_properties()
1123 gic_data.rdists.has_rvpeid ? "RVPEID " : "", in gic_update_rdist_properties()
1124 gic_data.rdists.has_vpend_valid_dirty ? "Valid+Dirty " : ""); in gic_update_rdist_properties()
1130 return readl_relaxed(gic_data.dist_base + GICD_CTLR) & GICD_CTLR_DS; in gic_dist_security_disabled()
1249 if (need_rss && (!gic_data.has_rss)) in gic_cpu_sys_reg_init()
1264 !!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) && in gic_dist_supports_lpis()
1279 WARN((gic_data.ppi_nr > 16 || GIC_ESPI_NR != 0) && in gic_cpu_init()
1287 for (i = 0; i < gic_data.ppi_nr + 16; i += 32) in gic_cpu_init()
1290 gic_cpu_config(rbase, gic_data.ppi_nr + 16, gic_redist_wait_for_rwp); in gic_cpu_init()
1387 .fwnode = gic_data.fwnode, in gic_smp_init()
1397 base_sgi = irq_domain_alloc_irqs(gic_data.domain, 8, NUMA_NO_NODE, &sgi_fwspec); in gic_smp_init()
1434 gic_data.redist_regions[0].redist_base, in gic_set_affinity()
1435 gic_data.redist_stride); in gic_set_affinity()
1678 if (!gic_data.ppi_descs) in fwspec_is_partitioned_ppi()
1714 return d == gic_data.domain; in gic_irq_domain_select()
1721 return d == partition_get_domain(gic_data.ppi_descs[ppi_idx]); in gic_irq_domain_select()
1741 if (!gic_data.ppi_descs) in partition_domain_translate()
1753 ret = partition_translate_id(gic_data.ppi_descs[ppi_idx], in partition_domain_translate()
1832 for (i = 0; i < gic_data.nr_redist_regions; i++) { in gic_enable_quirk_nvidia_t241()
1834 (u64)gic_data.redist_regions[i].phys_base)); in gic_enable_quirk_nvidia_t241()
1843 phys = gic_data.dist_phys_base + T241_CHIP_GICDA_OFFSET; in gic_enable_quirk_nvidia_t241()
1958 if (gic_data.flags & FLAGS_WORKAROUND_MTK_GICR_SAVE) { in gic_enable_nmi_support()
1963 ppi_nmi_refs = kcalloc(gic_data.ppi_nr, sizeof(*ppi_nmi_refs), GFP_KERNEL); in gic_enable_nmi_support()
1967 for (i = 0; i < gic_data.ppi_nr; i++) in gic_enable_nmi_support()
2027 gic_data.fwnode = handle; in gic_init_bases()
2028 gic_data.dist_phys_base = dist_phys_base; in gic_init_bases()
2029 gic_data.dist_base = dist_base; in gic_init_bases()
2030 gic_data.redist_regions = rdist_regs; in gic_init_bases()
2031 gic_data.nr_redist_regions = nr_redist_regions; in gic_init_bases()
2032 gic_data.redist_stride = redist_stride; in gic_init_bases()
2037 typer = readl_relaxed(gic_data.dist_base + GICD_TYPER); in gic_init_bases()
2038 gic_data.rdists.gicd_typer = typer; in gic_init_bases()
2040 gic_enable_quirks(readl_relaxed(gic_data.dist_base + GICD_IIDR), in gic_init_bases()
2041 gic_quirks, &gic_data); in gic_init_bases()
2050 if (!(gic_data.flags & FLAGS_WORKAROUND_CAVIUM_ERRATUM_38539)) in gic_init_bases()
2051 gic_data.rdists.gicd_typer2 = readl_relaxed(gic_data.dist_base + GICD_TYPER2); in gic_init_bases()
2053 gic_data.domain = irq_domain_create_tree(handle, &gic_irq_domain_ops, in gic_init_bases()
2054 &gic_data); in gic_init_bases()
2055 gic_data.rdists.rdist = alloc_percpu(typeof(*gic_data.rdists.rdist)); in gic_init_bases()
2058 gic_data.rdists.has_rvpeid = true; in gic_init_bases()
2059 gic_data.rdists.has_vlpis = true; in gic_init_bases()
2060 gic_data.rdists.has_direct_lpi = true; in gic_init_bases()
2061 gic_data.rdists.has_vpend_valid_dirty = true; in gic_init_bases()
2064 if (WARN_ON(!gic_data.domain) || WARN_ON(!gic_data.rdists.rdist)) { in gic_init_bases()
2069 irq_domain_update_bus_token(gic_data.domain, DOMAIN_BUS_WIRED); in gic_init_bases()
2071 gic_data.has_rss = !!(typer & GICD_TYPER_RSS); in gic_init_bases()
2074 err = mbi_init(handle, gic_data.domain); in gic_init_bases()
2089 its_init(handle, &gic_data.rdists, gic_data.domain); in gic_init_bases()
2094 gicv2m_init(handle, gic_data.domain); in gic_init_bases()
2102 if (gic_data.domain) in gic_init_bases()
2103 irq_domain_remove(gic_data.domain); in gic_init_bases()
2104 free_percpu(gic_data.rdists.rdist); in gic_init_bases()
2130 gic_data.ppi_descs = kcalloc(gic_data.ppi_nr, sizeof(*gic_data.ppi_descs), GFP_KERNEL); in gic_populate_ppi_partitions()
2131 if (!gic_data.ppi_descs) in gic_populate_ppi_partitions()
2188 for (i = 0; i < gic_data.ppi_nr; i++) { in gic_populate_ppi_partitions()
2192 .fwnode = gic_data.fwnode, in gic_populate_ppi_partitions()
2204 desc = partition_create_desc(gic_data.fwnode, parts, nr_parts, in gic_populate_ppi_partitions()
2209 gic_data.ppi_descs[i] = desc; in gic_populate_ppi_partitions()
2237 gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; in gic_of_setup_kvm_info()
2238 gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; in gic_of_setup_kvm_info()
2313 gic_enable_of_quirks(node, gic_quirks, &gic_data); in gic_of_init()
2579 gic_v3_kvm_info.has_v4 = gic_data.rdists.has_vlpis; in gic_acpi_setup_kvm_info()
2580 gic_v3_kvm_info.has_v4_1 = gic_data.rdists.has_rvpeid; in gic_acpi_setup_kvm_info()