Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux

Pull irqdomain bug fixes from Grant Likely:
"This branch contains a set of straight forward bug fixes to the
irqdomain code and to a couple of drivers that make use of it."

* tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux:
irqchip: Return -EPERM for reserved IRQs
irqdomain: document the simple domain first_irq
kernel/irq/irqdomain.c: before use 'irq_data', need check it whether valid.
irqdomain: export irq_domain_add_simple

+9 -4
+1 -1
drivers/irqchip/irq-versatile-fpga.c
··· 119 119 120 120 /* Skip invalid IRQs, only register handlers for the real ones */ 121 121 if (!(f->valid & BIT(hwirq))) 122 - return -ENOTSUPP; 122 + return -EPERM; 123 123 irq_set_chip_data(irq, f); 124 124 irq_set_chip_and_handler(irq, &f->chip, 125 125 handle_level_irq);
+1 -1
drivers/irqchip/irq-vic.c
··· 197 197 198 198 /* Skip invalid IRQs, only register handlers for the real ones */ 199 199 if (!(v->valid_sources & (1 << hwirq))) 200 - return -ENOTSUPP; 200 + return -EPERM; 201 201 irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq); 202 202 irq_set_chip_data(irq, v->base); 203 203 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
+7 -2
kernel/irq/irqdomain.c
··· 143 143 * irq_domain_add_simple() - Allocate and register a simple irq_domain. 144 144 * @of_node: pointer to interrupt controller's device tree node. 145 145 * @size: total number of irqs in mapping 146 - * @first_irq: first number of irq block assigned to the domain 146 + * @first_irq: first number of irq block assigned to the domain, 147 + * pass zero to assign irqs on-the-fly. This will result in a 148 + * linear IRQ domain so it is important to use irq_create_mapping() 149 + * for each used IRQ, especially when SPARSE_IRQ is enabled. 147 150 * @ops: map/unmap domain callbacks 148 151 * @host_data: Controller private data pointer 149 152 * ··· 194 191 /* A linear domain is the default */ 195 192 return irq_domain_add_linear(of_node, size, ops, host_data); 196 193 } 194 + EXPORT_SYMBOL_GPL(irq_domain_add_simple); 197 195 198 196 /** 199 197 * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. ··· 401 397 while (count--) { 402 398 int irq = irq_base + count; 403 399 struct irq_data *irq_data = irq_get_irq_data(irq); 404 - irq_hw_number_t hwirq = irq_data->hwirq; 400 + irq_hw_number_t hwirq; 405 401 406 402 if (WARN_ON(!irq_data || irq_data->domain != domain)) 407 403 continue; 408 404 405 + hwirq = irq_data->hwirq; 409 406 irq_set_status_flags(irq, IRQ_NOREQUEST); 410 407 411 408 /* remove chip and handler */