gic                31 arch/mips/include/asm/mips-gic.h 	CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_SHARED_OFS + off, name)
gic                35 arch/mips/include/asm/mips-gic.h 	CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_SHARED_OFS + off, name)
gic                39 arch/mips/include/asm/mips-gic.h 	CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_LOCAL_OFS + off, vl_##name)	\
gic                40 arch/mips/include/asm/mips-gic.h 	CPS_ACCESSOR_RO(gic, sz, MIPS_GIC_REDIR_OFS + off, vo_##name)
gic                44 arch/mips/include/asm/mips-gic.h 	CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_LOCAL_OFS + off, vl_##name)	\
gic                45 arch/mips/include/asm/mips-gic.h 	CPS_ACCESSOR_RW(gic, sz, MIPS_GIC_REDIR_OFS + off, vo_##name)
gic               164 arch/mips/include/asm/vdso/gettimeofday.h 	void __iomem *gic = get_gic(data);
gic               168 arch/mips/include/asm/vdso/gettimeofday.h 		hi = __raw_readl(gic + sizeof(lo));
gic               169 arch/mips/include/asm/vdso/gettimeofday.h 		lo = __raw_readl(gic);
gic               170 arch/mips/include/asm/vdso/gettimeofday.h 		hi2 = __raw_readl(gic + sizeof(lo));
gic                28 drivers/irqchip/irq-gic-pm.c 	struct gic_chip_data *gic = chip_pm->chip_data;
gic                44 drivers/irqchip/irq-gic-pm.c 	if (!gic)
gic                47 drivers/irqchip/irq-gic-pm.c 	gic_dist_restore(gic);
gic                48 drivers/irqchip/irq-gic-pm.c 	gic_cpu_restore(gic);
gic                56 drivers/irqchip/irq-gic-pm.c 	struct gic_chip_data *gic = chip_pm->chip_data;
gic                59 drivers/irqchip/irq-gic-pm.c 	gic_dist_save(gic);
gic                60 drivers/irqchip/irq-gic-pm.c 	gic_cpu_save(gic);
gic               361 drivers/irqchip/irq-gic.c 	struct gic_chip_data *gic = &gic_data[0];
gic               362 drivers/irqchip/irq-gic.c 	void __iomem *cpu_base = gic_data_cpu_base(gic);
gic               372 drivers/irqchip/irq-gic.c 			handle_domain_irq(gic->domain, irqnr, regs);
gic               442 drivers/irqchip/irq-gic.c static u8 gic_get_cpumask(struct gic_chip_data *gic)
gic               444 drivers/irqchip/irq-gic.c 	void __iomem *base = gic_data_dist_base(gic);
gic               467 drivers/irqchip/irq-gic.c static void gic_cpu_if_up(struct gic_chip_data *gic)
gic               469 drivers/irqchip/irq-gic.c 	void __iomem *cpu_base = gic_data_cpu_base(gic);
gic               474 drivers/irqchip/irq-gic.c 	if (gic == &gic_data[0] && static_branch_likely(&supports_deactivate_key))
gic               491 drivers/irqchip/irq-gic.c static void gic_dist_init(struct gic_chip_data *gic)
gic               495 drivers/irqchip/irq-gic.c 	unsigned int gic_irqs = gic->gic_irqs;
gic               496 drivers/irqchip/irq-gic.c 	void __iomem *base = gic_data_dist_base(gic);
gic               503 drivers/irqchip/irq-gic.c 	cpumask = gic_get_cpumask(gic);
gic               514 drivers/irqchip/irq-gic.c static int gic_cpu_init(struct gic_chip_data *gic)
gic               516 drivers/irqchip/irq-gic.c 	void __iomem *dist_base = gic_data_dist_base(gic);
gic               517 drivers/irqchip/irq-gic.c 	void __iomem *base = gic_data_cpu_base(gic);
gic               526 drivers/irqchip/irq-gic.c 	if (gic == &gic_data[0]) {
gic               534 drivers/irqchip/irq-gic.c 		cpu_mask = gic_get_cpumask(gic);
gic               549 drivers/irqchip/irq-gic.c 	gic_cpu_if_up(gic);
gic               577 drivers/irqchip/irq-gic.c void gic_dist_save(struct gic_chip_data *gic)
gic               583 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic))
gic               586 drivers/irqchip/irq-gic.c 	gic_irqs = gic->gic_irqs;
gic               587 drivers/irqchip/irq-gic.c 	dist_base = gic_data_dist_base(gic);
gic               593 drivers/irqchip/irq-gic.c 		gic->saved_spi_conf[i] =
gic               597 drivers/irqchip/irq-gic.c 		gic->saved_spi_target[i] =
gic               601 drivers/irqchip/irq-gic.c 		gic->saved_spi_enable[i] =
gic               605 drivers/irqchip/irq-gic.c 		gic->saved_spi_active[i] =
gic               616 drivers/irqchip/irq-gic.c void gic_dist_restore(struct gic_chip_data *gic)
gic               622 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic))
gic               625 drivers/irqchip/irq-gic.c 	gic_irqs = gic->gic_irqs;
gic               626 drivers/irqchip/irq-gic.c 	dist_base = gic_data_dist_base(gic);
gic               634 drivers/irqchip/irq-gic.c 		writel_relaxed(gic->saved_spi_conf[i],
gic               642 drivers/irqchip/irq-gic.c 		writel_relaxed(gic->saved_spi_target[i],
gic               648 drivers/irqchip/irq-gic.c 		writel_relaxed(gic->saved_spi_enable[i],
gic               655 drivers/irqchip/irq-gic.c 		writel_relaxed(gic->saved_spi_active[i],
gic               662 drivers/irqchip/irq-gic.c void gic_cpu_save(struct gic_chip_data *gic)
gic               669 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic))
gic               672 drivers/irqchip/irq-gic.c 	dist_base = gic_data_dist_base(gic);
gic               673 drivers/irqchip/irq-gic.c 	cpu_base = gic_data_cpu_base(gic);
gic               678 drivers/irqchip/irq-gic.c 	ptr = raw_cpu_ptr(gic->saved_ppi_enable);
gic               682 drivers/irqchip/irq-gic.c 	ptr = raw_cpu_ptr(gic->saved_ppi_active);
gic               686 drivers/irqchip/irq-gic.c 	ptr = raw_cpu_ptr(gic->saved_ppi_conf);
gic               692 drivers/irqchip/irq-gic.c void gic_cpu_restore(struct gic_chip_data *gic)
gic               699 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic))
gic               702 drivers/irqchip/irq-gic.c 	dist_base = gic_data_dist_base(gic);
gic               703 drivers/irqchip/irq-gic.c 	cpu_base = gic_data_cpu_base(gic);
gic               708 drivers/irqchip/irq-gic.c 	ptr = raw_cpu_ptr(gic->saved_ppi_enable);
gic               715 drivers/irqchip/irq-gic.c 	ptr = raw_cpu_ptr(gic->saved_ppi_active);
gic               722 drivers/irqchip/irq-gic.c 	ptr = raw_cpu_ptr(gic->saved_ppi_conf);
gic               731 drivers/irqchip/irq-gic.c 	gic_cpu_if_up(gic);
gic               769 drivers/irqchip/irq-gic.c static int gic_pm_init(struct gic_chip_data *gic)
gic               771 drivers/irqchip/irq-gic.c 	gic->saved_ppi_enable = __alloc_percpu(DIV_ROUND_UP(32, 32) * 4,
gic               773 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic->saved_ppi_enable))
gic               776 drivers/irqchip/irq-gic.c 	gic->saved_ppi_active = __alloc_percpu(DIV_ROUND_UP(32, 32) * 4,
gic               778 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic->saved_ppi_active))
gic               781 drivers/irqchip/irq-gic.c 	gic->saved_ppi_conf = __alloc_percpu(DIV_ROUND_UP(32, 16) * 4,
gic               783 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic->saved_ppi_conf))
gic               786 drivers/irqchip/irq-gic.c 	if (gic == &gic_data[0])
gic               792 drivers/irqchip/irq-gic.c 	free_percpu(gic->saved_ppi_active);
gic               794 drivers/irqchip/irq-gic.c 	free_percpu(gic->saved_ppi_enable);
gic               799 drivers/irqchip/irq-gic.c static int gic_pm_init(struct gic_chip_data *gic)
gic               979 drivers/irqchip/irq-gic.c 	struct gic_chip_data *gic = d->host_data;
gic               983 drivers/irqchip/irq-gic.c 		irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
gic               987 drivers/irqchip/irq-gic.c 		irq_domain_set_info(d, irq, hw, &gic->chip, d->host_data,
gic              1077 drivers/irqchip/irq-gic.c static void gic_init_chip(struct gic_chip_data *gic, struct device *dev,
gic              1081 drivers/irqchip/irq-gic.c 	gic->chip = gic_chip;
gic              1082 drivers/irqchip/irq-gic.c 	gic->chip.name = name;
gic              1083 drivers/irqchip/irq-gic.c 	gic->chip.parent_device = dev;
gic              1086 drivers/irqchip/irq-gic.c 		gic->chip.irq_mask = gic_eoimode1_mask_irq;
gic              1087 drivers/irqchip/irq-gic.c 		gic->chip.irq_eoi = gic_eoimode1_eoi_irq;
gic              1088 drivers/irqchip/irq-gic.c 		gic->chip.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity;
gic              1092 drivers/irqchip/irq-gic.c 	if (gic == &gic_data[0])
gic              1093 drivers/irqchip/irq-gic.c 		gic->chip.irq_set_affinity = gic_set_affinity;
gic              1097 drivers/irqchip/irq-gic.c static int gic_init_bases(struct gic_chip_data *gic,
gic              1102 drivers/irqchip/irq-gic.c 	if (IS_ENABLED(CONFIG_GIC_NON_BANKED) && gic->percpu_offset) {
gic              1106 drivers/irqchip/irq-gic.c 		gic->dist_base.percpu_base = alloc_percpu(void __iomem *);
gic              1107 drivers/irqchip/irq-gic.c 		gic->cpu_base.percpu_base = alloc_percpu(void __iomem *);
gic              1108 drivers/irqchip/irq-gic.c 		if (WARN_ON(!gic->dist_base.percpu_base ||
gic              1109 drivers/irqchip/irq-gic.c 			    !gic->cpu_base.percpu_base)) {
gic              1117 drivers/irqchip/irq-gic.c 			unsigned long offset = gic->percpu_offset * core_id;
gic              1118 drivers/irqchip/irq-gic.c 			*per_cpu_ptr(gic->dist_base.percpu_base, cpu) =
gic              1119 drivers/irqchip/irq-gic.c 				gic->raw_dist_base + offset;
gic              1120 drivers/irqchip/irq-gic.c 			*per_cpu_ptr(gic->cpu_base.percpu_base, cpu) =
gic              1121 drivers/irqchip/irq-gic.c 				gic->raw_cpu_base + offset;
gic              1124 drivers/irqchip/irq-gic.c 		gic_set_base_accessor(gic, gic_get_percpu_base);
gic              1127 drivers/irqchip/irq-gic.c 		WARN(gic->percpu_offset,
gic              1129 drivers/irqchip/irq-gic.c 		     gic->percpu_offset);
gic              1130 drivers/irqchip/irq-gic.c 		gic->dist_base.common_base = gic->raw_dist_base;
gic              1131 drivers/irqchip/irq-gic.c 		gic->cpu_base.common_base = gic->raw_cpu_base;
gic              1132 drivers/irqchip/irq-gic.c 		gic_set_base_accessor(gic, gic_get_common_base);
gic              1139 drivers/irqchip/irq-gic.c 	gic_irqs = readl_relaxed(gic_data_dist_base(gic) + GIC_DIST_CTR) & 0x1f;
gic              1143 drivers/irqchip/irq-gic.c 	gic->gic_irqs = gic_irqs;
gic              1146 drivers/irqchip/irq-gic.c 		gic->domain = irq_domain_create_linear(handle, gic_irqs,
gic              1148 drivers/irqchip/irq-gic.c 						       gic);
gic              1165 drivers/irqchip/irq-gic.c 		gic->domain = irq_domain_add_legacy(NULL, gic_irqs, irq_base,
gic              1166 drivers/irqchip/irq-gic.c 						    16, &gic_irq_domain_ops, gic);
gic              1169 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic->domain)) {
gic              1174 drivers/irqchip/irq-gic.c 	gic_dist_init(gic);
gic              1175 drivers/irqchip/irq-gic.c 	ret = gic_cpu_init(gic);
gic              1179 drivers/irqchip/irq-gic.c 	ret = gic_pm_init(gic);
gic              1186 drivers/irqchip/irq-gic.c 	if (IS_ENABLED(CONFIG_GIC_NON_BANKED) && gic->percpu_offset) {
gic              1187 drivers/irqchip/irq-gic.c 		free_percpu(gic->dist_base.percpu_base);
gic              1188 drivers/irqchip/irq-gic.c 		free_percpu(gic->cpu_base.percpu_base);
gic              1194 drivers/irqchip/irq-gic.c static int __init __gic_init_bases(struct gic_chip_data *gic,
gic              1200 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic || gic->domain))
gic              1203 drivers/irqchip/irq-gic.c 	if (gic == &gic_data[0]) {
gic              1222 drivers/irqchip/irq-gic.c 	if (static_branch_likely(&supports_deactivate_key) && gic == &gic_data[0]) {
gic              1224 drivers/irqchip/irq-gic.c 		gic_init_chip(gic, NULL, name, true);
gic              1226 drivers/irqchip/irq-gic.c 		name = kasprintf(GFP_KERNEL, "GIC-%d", (int)(gic-&gic_data[0]));
gic              1227 drivers/irqchip/irq-gic.c 		gic_init_chip(gic, NULL, name, false);
gic              1230 drivers/irqchip/irq-gic.c 	ret = gic_init_bases(gic, handle);
gic              1239 drivers/irqchip/irq-gic.c 	struct gic_chip_data *gic;
gic              1247 drivers/irqchip/irq-gic.c 	gic = &gic_data[0];
gic              1248 drivers/irqchip/irq-gic.c 	gic->raw_dist_base = dist_base;
gic              1249 drivers/irqchip/irq-gic.c 	gic->raw_cpu_base = cpu_base;
gic              1251 drivers/irqchip/irq-gic.c 	__gic_init_bases(gic, NULL);
gic              1254 drivers/irqchip/irq-gic.c static void gic_teardown(struct gic_chip_data *gic)
gic              1256 drivers/irqchip/irq-gic.c 	if (WARN_ON(!gic))
gic              1259 drivers/irqchip/irq-gic.c 	if (gic->raw_dist_base)
gic              1260 drivers/irqchip/irq-gic.c 		iounmap(gic->raw_dist_base);
gic              1261 drivers/irqchip/irq-gic.c 	if (gic->raw_cpu_base)
gic              1262 drivers/irqchip/irq-gic.c 		iounmap(gic->raw_cpu_base);
gic              1353 drivers/irqchip/irq-gic.c static int gic_of_setup(struct gic_chip_data *gic, struct device_node *node)
gic              1355 drivers/irqchip/irq-gic.c 	if (!gic || !node)
gic              1358 drivers/irqchip/irq-gic.c 	gic->raw_dist_base = of_iomap(node, 0);
gic              1359 drivers/irqchip/irq-gic.c 	if (WARN(!gic->raw_dist_base, "unable to map gic dist registers\n"))
gic              1362 drivers/irqchip/irq-gic.c 	gic->raw_cpu_base = of_iomap(node, 1);
gic              1363 drivers/irqchip/irq-gic.c 	if (WARN(!gic->raw_cpu_base, "unable to map gic cpu registers\n"))
gic              1366 drivers/irqchip/irq-gic.c 	if (of_property_read_u32(node, "cpu-offset", &gic->percpu_offset))
gic              1367 drivers/irqchip/irq-gic.c 		gic->percpu_offset = 0;
gic              1372 drivers/irqchip/irq-gic.c 	gic_teardown(gic);
gic              1377 drivers/irqchip/irq-gic.c int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
gic              1381 drivers/irqchip/irq-gic.c 	if (!dev || !dev->of_node || !gic || !irq)
gic              1384 drivers/irqchip/irq-gic.c 	*gic = devm_kzalloc(dev, sizeof(**gic), GFP_KERNEL);
gic              1385 drivers/irqchip/irq-gic.c 	if (!*gic)
gic              1388 drivers/irqchip/irq-gic.c 	gic_init_chip(*gic, dev, dev->of_node->name, false);
gic              1390 drivers/irqchip/irq-gic.c 	ret = gic_of_setup(*gic, dev->of_node);
gic              1394 drivers/irqchip/irq-gic.c 	ret = gic_init_bases(*gic, &dev->of_node->fwnode);
gic              1396 drivers/irqchip/irq-gic.c 		gic_teardown(*gic);
gic              1400 drivers/irqchip/irq-gic.c 	irq_set_chained_handler_and_data(irq, gic_handle_cascade_irq, *gic);
gic              1432 drivers/irqchip/irq-gic.c 	struct gic_chip_data *gic;
gic              1441 drivers/irqchip/irq-gic.c 	gic = &gic_data[gic_cnt];
gic              1443 drivers/irqchip/irq-gic.c 	ret = gic_of_setup(gic, node);
gic              1451 drivers/irqchip/irq-gic.c 	if (gic_cnt == 0 && !gic_check_eoimode(node, &gic->raw_cpu_base))
gic              1454 drivers/irqchip/irq-gic.c 	ret = __gic_init_bases(gic, &node->fwnode);
gic              1456 drivers/irqchip/irq-gic.c 		gic_teardown(gic);
gic              1486 drivers/irqchip/irq-gic.c int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq)
gic              1601 drivers/irqchip/irq-gic.c 	struct gic_chip_data *gic = &gic_data[0];
gic              1612 drivers/irqchip/irq-gic.c 	gic->raw_cpu_base = ioremap(acpi_data.cpu_phys_base, ACPI_GIC_CPU_IF_MEM_SIZE);
gic              1613 drivers/irqchip/irq-gic.c 	if (!gic->raw_cpu_base) {
gic              1619 drivers/irqchip/irq-gic.c 	gic->raw_dist_base = ioremap(dist->base_address,
gic              1621 drivers/irqchip/irq-gic.c 	if (!gic->raw_dist_base) {
gic              1623 drivers/irqchip/irq-gic.c 		gic_teardown(gic);
gic              1641 drivers/irqchip/irq-gic.c 		gic_teardown(gic);
gic              1645 drivers/irqchip/irq-gic.c 	ret = __gic_init_bases(gic, domain_handle);
gic              1649 drivers/irqchip/irq-gic.c 		gic_teardown(gic);
gic               137 include/linux/irqchip/arm-gic.h void gic_cpu_save(struct gic_chip_data *gic);
gic               138 include/linux/irqchip/arm-gic.h void gic_cpu_restore(struct gic_chip_data *gic);
gic               139 include/linux/irqchip/arm-gic.h void gic_dist_save(struct gic_chip_data *gic);
gic               140 include/linux/irqchip/arm-gic.h void gic_dist_restore(struct gic_chip_data *gic);
gic               152 include/linux/irqchip/arm-gic.h int gic_of_init_child(struct device *dev, struct gic_chip_data **gic, int irq);