Searched refs:v2m (Results 1 - 2 of 2) sorted by relevance
/linux-4.1.27/drivers/irqchip/ |
H A D | irq-gic-v2m.c | 2 * ARM GIC v2m MSI(-X) support 97 struct v2m_data *v2m = irq_data_get_irq_chip_data(data); gicv2m_compose_msi_msg() local 98 phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS; gicv2m_compose_msi_msg() 138 static void gicv2m_unalloc_msi(struct v2m_data *v2m, unsigned int hwirq) gicv2m_unalloc_msi() argument 142 pos = hwirq - v2m->spi_start; gicv2m_unalloc_msi() 143 if (pos < 0 || pos >= v2m->nr_spis) { gicv2m_unalloc_msi() 148 spin_lock(&v2m->msi_cnt_lock); gicv2m_unalloc_msi() 149 __clear_bit(pos, v2m->bm); gicv2m_unalloc_msi() 150 spin_unlock(&v2m->msi_cnt_lock); gicv2m_unalloc_msi() 156 struct v2m_data *v2m = domain->host_data; gicv2m_irq_domain_alloc() local 159 spin_lock(&v2m->msi_cnt_lock); gicv2m_irq_domain_alloc() 160 offset = find_first_zero_bit(v2m->bm, v2m->nr_spis); gicv2m_irq_domain_alloc() 161 if (offset < v2m->nr_spis) gicv2m_irq_domain_alloc() 162 __set_bit(offset, v2m->bm); gicv2m_irq_domain_alloc() 165 spin_unlock(&v2m->msi_cnt_lock); gicv2m_irq_domain_alloc() 170 hwirq = v2m->spi_start + offset; gicv2m_irq_domain_alloc() 174 gicv2m_unalloc_msi(v2m, hwirq); gicv2m_irq_domain_alloc() 179 &gicv2m_irq_chip, v2m); gicv2m_irq_domain_alloc() 188 struct v2m_data *v2m = irq_data_get_irq_chip_data(d); gicv2m_irq_domain_free() local 191 gicv2m_unalloc_msi(v2m, d->hwirq); gicv2m_irq_domain_free() 220 struct v2m_data *v2m; gicv2m_init_one() local 222 v2m = kzalloc(sizeof(struct v2m_data), GFP_KERNEL); gicv2m_init_one() 223 if (!v2m) { gicv2m_init_one() 228 ret = of_address_to_resource(node, 0, &v2m->res); gicv2m_init_one() 230 pr_err("Failed to allocate v2m resource.\n"); gicv2m_init_one() 234 v2m->base = ioremap(v2m->res.start, resource_size(&v2m->res)); gicv2m_init_one() 235 if (!v2m->base) { gicv2m_init_one() 241 if (!of_property_read_u32(node, "arm,msi-base-spi", &v2m->spi_start) && gicv2m_init_one() 242 !of_property_read_u32(node, "arm,msi-num-spis", &v2m->nr_spis)) { gicv2m_init_one() 244 v2m->spi_start, v2m->nr_spis); gicv2m_init_one() 246 u32 typer = readl_relaxed(v2m->base + V2M_MSI_TYPER); gicv2m_init_one() 248 v2m->spi_start = V2M_MSI_TYPER_BASE_SPI(typer); gicv2m_init_one() 249 v2m->nr_spis = V2M_MSI_TYPER_NUM_SPI(typer); gicv2m_init_one() 252 if (!is_msi_spi_valid(v2m->spi_start, v2m->nr_spis)) { gicv2m_init_one() 257 v2m->bm = kzalloc(sizeof(long) * BITS_TO_LONGS(v2m->nr_spis), gicv2m_init_one() 259 if (!v2m->bm) { gicv2m_init_one() 264 v2m->domain = irq_domain_add_tree(NULL, &gicv2m_domain_ops, v2m); gicv2m_init_one() 265 if (!v2m->domain) { gicv2m_init_one() 271 v2m->domain->parent = parent; gicv2m_init_one() 272 v2m->mchip.of_node = node; gicv2m_init_one() 273 v2m->mchip.domain = pci_msi_create_irq_domain(node, gicv2m_init_one() 275 v2m->domain); gicv2m_init_one() 276 if (!v2m->mchip.domain) { gicv2m_init_one() 282 spin_lock_init(&v2m->msi_cnt_lock); gicv2m_init_one() 284 ret = of_pci_msi_chip_add(&v2m->mchip); gicv2m_init_one() 291 (unsigned long)v2m->res.start, (unsigned long)v2m->res.end, gicv2m_init_one() 292 v2m->spi_start, (v2m->spi_start + v2m->nr_spis)); gicv2m_init_one() 297 if (v2m->mchip.domain) gicv2m_init_one() 298 irq_domain_remove(v2m->mchip.domain); gicv2m_init_one() 299 if (v2m->domain) gicv2m_init_one() 300 irq_domain_remove(v2m->domain); gicv2m_init_one() 302 kfree(v2m->bm); gicv2m_init_one() 304 iounmap(v2m->base); gicv2m_init_one() 306 kfree(v2m); gicv2m_init_one() 311 { .compatible = "arm,gic-v2m-frame", },
|
/linux-4.1.27/arch/arm/mach-vexpress/ |
H A D | Makefile | 7 obj-y := v2m.o
|
Completed in 90 milliseconds